(non-PHPdoc)
@see PAGI\Application.PAGIApplication::errorHandler()
773150
public function errorHandler($type, $message, $file, $line)
    {
        $this->log(
        	'ErrorHandler: '
            . implode(' ', array($type, $message, $file, $line))
        );
    }
940917
final public function handler($type = 'error', $action = 'restore', $callable_handler = false, $error_types = null)
    {
        if (empty($error_types)) {
            $error_types = E_ALL | E_STRICT;
        }
        switch (strtolower($type)) {
            case 'error':
                switch (strtolower($action)) {
                    case 'restore':
                        return restore_error_handler();
                        break;
                    case 'set':
                        return set_error_handler($callable_handler, $error_types);
                        break;
                    default:
                        return false;
                }
                break;
            case 'exception':
                switch (strtolower($action)) {
                    case 'restore':
                        return restore_exception_handler();
                        break;
                    case 'set':
                        return set_exception_handler($callable_handler);
                        break;
                    default:
                        return false;
                }
                break;
            default:
                return false;
        }
    }
967154
protected function attachPayloadErrorHandler() {
        $this->getPayloadInstance();
        if (method_exists($this->instance, 'errorHandler')) {
            $this->di->get(ErrorHandler::class)->addHandler([$this->instance, 'errorHandler']);
        }
    }
1291472
private function registerErrorHandler(): void
    {
        $whoops = new Run();
        $whoops->pushHandler(new PrettyPageHandler());
        $whoops->register();

        $this->errorHandler = $whoops;
    }
582094
public static function errorHandler($errno, $errstr, $errfile = null, $errline = null, $errcontext = null)
    {
        return true;
    }
453127
static public function errorHandler()
	{
	    $id = 'errorHandler';
	    if (!static::has($id)) {
	        static::setShared($id, function () {
	            $errorHandler = new ErrorHandler();
	            if ($options = Config::getCommon('error')) {
	                $errorHandler->setOptions($options);
	            }
	            $errorHandler->register();
	            return $errorHandler;
	        });
	    }
	    return static::get($id);
	}
1200748
function handleError( $errorCode, $errorType = false, $parameters = array(), $userParameters = false )
    {
        if ( self::$useExceptions && $errorType === "kernel" )
        {
            switch ( $errorCode )
            {
                case eZError::KERNEL_MODULE_NOT_FOUND:
                    throw new ezpModuleNotFound( $parameters["module"] );

                case eZError::KERNEL_MODULE_DISABLED:
                    if ( $parameters["check"]["view_checked"] )
                        throw new ezpModuleViewDisabled( $parameters["check"]['module'], $parameters["check"]['view'] );

                    throw new ezpModuleDisabled( $parameters["check"]['module'] );

                case eZError::KERNEL_MODULE_VIEW_NOT_FOUND:
                    throw new ezpModuleViewNotFound( $parameters["check"]['module'], $parameters["check"]['view'] );

                case eZError::KERNEL_ACCESS_DENIED:
                    throw new ezpAccessDenied;

                //case eZError::KERNEL_MOVED:
                // @todo ?

                case eZError::KERNEL_NOT_AVAILABLE:
                case eZError::KERNEL_NOT_FOUND:
                    throw new ezpContentNotFoundException( "" );

                case eZError::KERNEL_LANGUAGE_NOT_FOUND:
                        throw new ezpLanguageNotFound;
            }
        }

        if ( !$errorType )
        {
            eZDebug::writeWarning( "No error type specified for error code $errorCode, assuming kernel.\nA specific error type should be supplied, please check your code.", __METHOD__ );
            $errorType = 'kernel';
        }
        $errorModule = $this->errorModule();

        $module = self::findModule( $errorModule['module'], $this );

        if ( $module === null )
        {
            return false;
        }

        $result = $module->run( $errorModule['view'], array( $errorType, $errorCode, $parameters, $userParameters ) );
        // The error module may want to redirect to another URL, see error.ini
        if ( $this->exitStatus() != self::STATUS_REDIRECT and
             $this->exitStatus() != self::STATUS_RERUN )
        {
            $this->setExitStatus( self::STATUS_FAILED );
            $this->setErrorCode( $errorCode );
        }
        return $result;
    }
93274
static function _handleErrors($error, $errstr = '', $errfile = '', $errline = 0)
    {
        $ErrorType = self::ERR_TYP_EXCEPTION;
        if (! $error instanceof \Exception) {
            if (interface_exists('Throwable', false) && $error instanceof \Throwable)
                VOID;
            else {
                $ErrorType = self::ERR_TYP_ERROR;

                ## handle errors
                $error = new ErrorException(
                    $errstr, $error, 1, $errfile, $errline
                );
            }
        }

        ## happen when start handleError() but within codeblock an exception rised
        ## so code follow will stop then we need cleanup to first exception stack
        while (self::getStackNum() && $Stack = &self::$_STACK[self::getStackNum()-1]) {
            if ($ErrorType === $Stack['error_type'])
                break;

            self::handleDone();
        }

        $Stack['has_handled_error'] = $error;

        // ...

        if (!isset($Stack['callable']) || $Stack['callable'] === null)
            return;

        $currLevel = self::getStackNum();
        try {
            ## call user error handler callable
            ## exception will passed as errno on exception catch
            call_user_func($Stack['callable'], $error);

        } catch (\Exception $e) {
            ## during handling an error if any exception happen it must handle with parent handler
            if (self::getStackNum() == $currLevel)
                ## close current handler if not, the handleDone may be called from within handler callable
                self::handleDone();

            if ($Stack['error_type'] == self::ERR_TYP_ERROR)
                ## Just throw exception, it might handled with exception handlers
                throw $e;

            $isHandled = false;
            while (self::hasHandling()) {
                $Stack = & self::$_STACK[self::getStackNum()-1];
                if ($Stack['error_type'] == self::ERR_TYP_EXCEPTION) {
                    $isHandled = true;
                    self::_handleErrors($e);
                    break;
                }

                self::handleDone();
            }

            if (!$isHandled)
                ## throw exception if it not handled
                throw $e;
        }
    }
584665
public function exceptionHandler($exception) {
		try {
			// load errorhandler
			$debug = Factory::load('Debug');
			$debug->errorhandler($exception);
		} catch (\Exception $e) {
			echo "<pre>$exception</pre>\n\n";

			// useful if the \Exception handler itself contains errors
			echo "<pre>The Debug class threw an exception:\n$e</pre>";
		}
	}
12684
public function php_error_handler($errno, $errstr, $errfile, $errline)
    {
        $e = new \Exception($errstr, $errno);
        call_user_func($this->error50x, $e);
    }
969327
final public static function errorHandler(string $err_no, string $err_msg, string $errfile, string $errline)
    {
        throw new Server500(new \ArrayObject(array("explain" => $err_msg,
            "type_error" => self::errorMap($err_no), "line_error" => $errline, "file_error" => $errfile)));
    }
1155434
final public static function errorHandler($severity, $message, $filepath, $line)
	{
		$is_error = (((E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR) & $severity) === $severity);

		$level = self::$levels[$severity];

		$context = self::getContext(self::ERROR, $level, $message, $filepath, $line);

		if (!in_array($severity, array_merge([E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR, E_RECOVERABLE_ERROR], self::$ignore), true)) {

			error_log("{$level}: {$message} in {$filepath} in line {$line}");

			if (!empty(self::$logger)) {
				self::$logger->error("{$level}: {$message} in {$filepath} in line {$line}", $context);
			}
		}

		if ($is_error) {
			if (!empty(self::$logger)) {
				self::$logger->critical("{$level}: {$message} in {$filepath} in line {$line}", $context);
			}

			if (!is_null(self::$lastAction)) {
				$fn = self::$lastAction;
				$fn();
			}

			self::$httpHandler->overwrite(self::getErrorTemplate(self::$httpHandler, self::$defaultErrorPath))->withStatus(500)->send();
		}
	}
704188
protected function defineErrorHandler()
    {
        $errorRender = $this->obtainErrorRender();
        
        //If not render to use
        if ($errorRender === false) {
            return;
        }

        //add the handler for errors
        set_error_handler([$this, 'errorHandler']);
        
        \BFW\Application::getInstance()
            ->getMonolog()
            ->getLogger()
            ->debug('New error handler defined.')
        ;
    }
268259
public function handler($errno, $errstr, $errfile, $errline)
    {
        throw new \ErrorException($errstr, $errno, 0, $errfile, $errline);
    }
509840
protected function callErrorHandler($argument = null)
    {
        ob_start();
        if (is_callable($this->error)) {
            call_user_func_array($this->error, array($argument));
        } else {
            call_user_func_array(array($this, 'defaultError'), array($argument));
        }

        return ob_get_clean();
    }
936780
public function resolveErrorHandler($errorCode)
    {
        return array_key_exists($errorCode, $this->errorHandlers)
            ? call_user_func_array($this->errorHandlers[$errorCode], [])
            : '';
    }
1173057
public function createErrorHandler()
    {
        $config = $this->getConfig();
        if (!isset($config['error_handler'])) {
            throw new Exception\RuntimeException('Not found error handler config');
        }
        
        $errorHandlerConfig = $config['error_handler']->toArray();
        $adapter = !isset($errorHandlerConfig['adapter']) ? HandlerDefault::class : $errorHandlerConfig['adapter'];
        $this->setServiceFactories('errorHandler', $adapter, false);
    }