mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 21:38:54 +00:00
[ticket/16378] Update function name to on_error
PHPBB3-16378
This commit is contained in:
parent
34595c02ba
commit
ba04bc9d22
1 changed files with 7 additions and 9 deletions
|
@ -20,15 +20,13 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||||
|
|
||||||
class exception_subscriber implements EventSubscriberInterface
|
class exception_subscriber implements EventSubscriberInterface
|
||||||
{
|
{
|
||||||
/**
|
/** @var \phpbb\language\language */
|
||||||
* @var \phpbb\language\language
|
|
||||||
*/
|
|
||||||
protected $language;
|
protected $language;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct method
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param \phpbb\language\language $language Language object
|
* @param \phpbb\language\language $language Language object
|
||||||
*/
|
*/
|
||||||
public function __construct(\phpbb\language\language $language)
|
public function __construct(\phpbb\language\language $language)
|
||||||
{
|
{
|
||||||
|
@ -36,12 +34,12 @@ class exception_subscriber implements EventSubscriberInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This listener is run when the ConsoleEvents::EXCEPTION event is triggered.
|
* This listener is run when the ConsoleEvents::ERROR event is triggered.
|
||||||
* It translate the exception message. If din debug mode the original exception is embedded.
|
* It translate the error message. If in debug mode the original exception is embedded.
|
||||||
*
|
*
|
||||||
* @param ConsoleErrorEvent $event
|
* @param ConsoleErrorEvent $event
|
||||||
*/
|
*/
|
||||||
public function on_exception(ConsoleErrorEvent $event)
|
public function on_error(ConsoleErrorEvent $event)
|
||||||
{
|
{
|
||||||
$original_exception = $event->getError();
|
$original_exception = $event->getError();
|
||||||
|
|
||||||
|
@ -59,7 +57,7 @@ class exception_subscriber implements EventSubscriberInterface
|
||||||
static public function getSubscribedEvents()
|
static public function getSubscribedEvents()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
ConsoleEvents::ERROR => 'on_exception',
|
ConsoleEvents::ERROR => 'on_error',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue