File: phpbb/console/exception_subscriber.php
Unmodified
Added
Modified
Removed
Line 29 | Line 29 |
---|
* Construct method * * @param \phpbb\language\language $language Language object
|
* Construct method * * @param \phpbb\language\language $language Language object
|
* @param bool $debug Debug mode
| |
*/
|
*/
|
public function __construct(\phpbb\language\language $language, $debug = false)
| public function __construct(\phpbb\language\language $language)
|
{ $this->language = $language;
|
{ $this->language = $language;
|
$this->debug = $debug;
| |
}
/**
| }
/**
|
Line 52 | Line 50 |
---|
$parameters = array_merge(array($original_exception->getMessage()), $original_exception->get_parameters()); $message = call_user_func_array(array($this->language, 'lang'), $parameters);
|
$parameters = array_merge(array($original_exception->getMessage()), $original_exception->get_parameters()); $message = call_user_func_array(array($this->language, 'lang'), $parameters);
|
if ($this->debug) {
| |
$exception = new \RuntimeException($message , $original_exception->getCode(), $original_exception);
|
$exception = new \RuntimeException($message , $original_exception->getCode(), $original_exception);
|
} else { $exception = new \RuntimeException($message , $original_exception->getCode()); }
| |
$event->setException($exception); }
| $event->setException($exception); }
|