Better error reporting
This commit is contained in:
parent
558246ab90
commit
a3e2744099
@ -20,6 +20,7 @@ class Exception extends \Exception
|
||||
if (\danog\MadelineProto\Logger::$constructed && $this->file !== __FILE__) {
|
||||
\danog\MadelineProto\Logger::log([$message.' in '.basename($this->file).':'.$this->line], \danog\MadelineProto\Logger::FATAL_ERROR);
|
||||
}
|
||||
\Rollbar\Rollbar::report_exception($this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -21,6 +21,7 @@ class RPCErrorException extends \Exception
|
||||
case 'CHANNEL_PRIVATE':$message = "You haven't joined this channel/supergroup"; break;
|
||||
case 'FLOOD_WAIT_666':$message = 'Spooky af m8'; break;
|
||||
case 'BOT_METHOD_INVALID':$message = 'This method cannot be run by a bot'; break;
|
||||
default: \Rollbar\Rollbar::report_exception($this);
|
||||
|
||||
}
|
||||
parent::__construct($message, $code, $previous);
|
||||
|
Loading…
Reference in New Issue
Block a user