public function handleException($exception)
    {
        if (!$this->ignorePrevHandler && $this->prevExceptionHandler) {
            call_user_func($this->prevExceptionHandler, $exception);
        }

        if (404 == $exception->getCode()) {
            if ($this->triggerHandler('notFound', $exception)) {
                return;
            }
        }

        if (!$this->triggerHandler('error', $exception)) {
            $this->internalHandleException($exception);
        }

        restore_exception_handler();
    }
public function handleException($exception)
    {
        if (!$this->ignorePrevHandler && $this->prevExceptionHandler) {
            call_user_func($this->prevExceptionHandler, $exception);
        }

        if (404 == $exception->getCode()) {
            if ($this->triggerHandler('notFound', $exception)) {
                return;
            }
        }

        if (!$this->triggerHandler('error', $exception)) {
            $this->internalHandleException($exception);
        }

        restore_exception_handler();
    }
public function handleException ( $ exception ) { if ( ! $ this -> ignorePrevHandler && $ this -> prevExceptionHandler ) { call_user_func ( $ this -> prevExceptionHandler , $ exception ) ; } if ( 404 == $ exception -> getCode ( ) ) { if ( $ this -> triggerHandler ( 'notFound' , $ exception ) ) { return ; } } if ( ! $ this -> triggerHandler ( 'error' , $ exception ) ) { $ this -> internalHandleException ( $ exception ) ; } restore_exception_handler ( ) ; }
The exception handler to render pretty message

@param \Exception|\Throwable $exception
The exception handler to render pretty message