public function notifySystemWithError($exception)
    {

        $app = $this->application;
        // log all errors
        $app->getLogger()->error($exception->getMessage());

        $applicationEvent = $app->getApplicationEvent();
        $applicationEvent->setName(ApplicationInterface::EVENT_SYSTEM_ERROR);
        $app->emit($applicationEvent, $exception);

        return Handler::DONE;
    }
public function notifySystemWithError($exception)
    {

        $app = $this->application;
        // log all errors
        $app->getLogger()->error($exception->getMessage());

        $applicationEvent = $app->getApplicationEvent();
        $applicationEvent->setName(ApplicationInterface::EVENT_SYSTEM_ERROR);
        $app->emit($applicationEvent, $exception);

        return Handler::DONE;
    }
public function notifySystemWithError ( $ exception ) { $ app = $ this -> application ; // log all errors $ app -> getLogger ( ) -> error ( $ exception -> getMessage ( ) ) ; $ applicationEvent = $ app -> getApplicationEvent ( ) ; $ applicationEvent -> setName ( ApplicationInterface :: EVENT_SYSTEM_ERROR ) ; $ app -> emit ( $ applicationEvent , $ exception ) ; return Handler :: DONE ; }
Notify system after error occurs

@param \Exception|\Throwable $exception
@return int
Notify system after error occurs