Return the MadelineProto version along with exception traces
This commit is contained in:
parent
f2e13cdac1
commit
6d26bf2a95
@ -19,7 +19,7 @@ class Exception extends \Exception
|
|||||||
|
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return $this->file === 'MadelineProto' ? $this->message : '\danog\MadelineProto\Exception'.($this->message !== '' ? ': ' : '').$this->message.' in '.$this->file.':'.$this->line.PHP_EOL.'TL Trace (YOU ABSOLUTELY MUST READ THE TEXT BELOW):'.PHP_EOL.$this->getTLTrace();
|
return $this->file === 'MadelineProto' ? $this->message : '\danog\MadelineProto\Exception'.($this->message !== '' ? ': ' : '').$this->message.' in '.$this->file.':'.$this->line.PHP_EOL.'Revision: '.@file_get_contents(__DIR__.'/../../../.git/refs/heads/master').PHP_EOL.'TL Trace (YOU ABSOLUTELY MUST READ THE TEXT BELOW):'.PHP_EOL.$this->getTLTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __construct($message = null, $code = 0, self $previous = null, $file = null, $line = null)
|
public function __construct($message = null, $code = 0, self $previous = null, $file = null, $line = null)
|
||||||
|
@ -32,7 +32,7 @@ class RPCErrorException extends \Exception
|
|||||||
|
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return sprintf(\danog\MadelineProto\Lang::$current_lang['rpc_tg_error'], $this->getMess(), $this->rpc, $this->file, $this->line.PHP_EOL.PHP_EOL).PHP_EOL.$this->getTLTrace().PHP_EOL;
|
return sprintf(\danog\MadelineProto\Lang::$current_lang['rpc_tg_error'], $this->getMess(), $this->rpc, $this->file, $this->line.PHP_EOL.PHP_EOL).PHP_EOL.'Revision: '.@file_get_contents(__DIR__.'/../../../.git/refs/heads/master').PHP_EOL.$this->getTLTrace().PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __construct($message = null, $code = 0, Exception $previous = null)
|
public function __construct($message = null, $code = 0, Exception $previous = null)
|
||||||
|
@ -18,7 +18,7 @@ class Exception extends \Exception
|
|||||||
|
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return get_class($this).($this->message !== '' ? ': ' : '').$this->message.PHP_EOL.'TL Trace (YOU ABSOLUTELY MUST READ THE TEXT BELOW):'.PHP_EOL.PHP_EOL.$this->getTLTrace().PHP_EOL;
|
return get_class($this).($this->message !== '' ? ': ' : '').$this->message.PHP_EOL.@file_get_contents(__DIR__.'/../../../.git/refs/heads/master').PHP_EOL.'TL Trace (YOU ABSOLUTELY MUST READ THE TEXT BELOW):'.PHP_EOL.PHP_EOL.$this->getTLTrace().PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __construct($message, $file = '')
|
public function __construct($message, $file = '')
|
||||||
|
Loading…
Reference in New Issue
Block a user