src/ErrorHandler/ErrorHandler.php
public function handleError($errType, $errMsg, $file, $line, $vars = array())
    {
        $error = $this->buildError($errType, $errMsg, $file, $line, $vars);
        $errorReporting = $this->cfg['errorReporting'] === 'system'
            ? \error_reporting() // note:  will return 0 if error suppression is active in call stack (via @ operator)
                                //  our shutdown function unsupresses fatal errors
            : $this->cfg['errorReporting'];
        $isHandledType = $errType & $errorReporting;
        if (!$isHandledType) {
            // not handled
            //   if cfg['errorReporting'] == 'system', error could simply be suppressed
            if ($error['continueToPrevHandler']) {
                return \call_user_func(
                    $this->prevErrorHandler,
                    $error['type'],
                    $error['message'],
                    $error['file'],
                    $error['line'],
                    $vars
                );
            }
            return false;   // return false to continue to "normal" error handler
        }
        if (!$error['isSuppressed']) {
            // suppressed error should not clear error caller
            $this->data['lastError'] = $error;
            $this->data['errorCaller'] = array();
            $this->eventManager->publish('errorHandler.error', $error);
        }
        $this->data['errors'][ $error['hash'] ] = $error;
        if ($error['continueToPrevHandler'] && $this->prevErrorHandler && !$error->isPropagationStopped()) {
            return \call_user_func(
                $this->prevErrorHandler,
                $error['type'],
                $error['message'],
                $error['file'],
                $error['line'],
                $vars
            );
        }
        if (\in_array($error['type'], array(E_USER_ERROR, E_RECOVERABLE_ERROR))) {
            $this->onUserError($error);
        }
        if ($error['continueToNormal']) {
            // PHP will log the error
            // if E_USER_ERROR, php will exit()
            return false;
        }
        return true;
    }
public function handleError($errType, $errMsg, $file, $line, $vars = array())
    {
        $error = $this->buildError($errType, $errMsg, $file, $line, $vars);
        $errorReporting = $this->cfg['errorReporting'] === 'system'
            ? \error_reporting() // note:  will return 0 if error suppression is active in call stack (via @ operator)
                                //  our shutdown function unsupresses fatal errors
            : $this->cfg['errorReporting'];
        $isHandledType = $errType & $errorReporting;
        if (!$isHandledType) {
            // not handled
            //   if cfg['errorReporting'] == 'system', error could simply be suppressed
            if ($error['continueToPrevHandler']) {
                return \call_user_func(
                    $this->prevErrorHandler,
                    $error['type'],
                    $error['message'],
                    $error['file'],
                    $error['line'],
                    $vars
                );
            }
            return false;   // return false to continue to "normal" error handler
        }
        if (!$error['isSuppressed']) {
            // suppressed error should not clear error caller
            $this->data['lastError'] = $error;
            $this->data['errorCaller'] = array();
            $this->eventManager->publish('errorHandler.error', $error);
        }
        $this->data['errors'][ $error['hash'] ] = $error;
        if ($error['continueToPrevHandler'] && $this->prevErrorHandler && !$error->isPropagationStopped()) {
            return \call_user_func(
                $this->prevErrorHandler,
                $error['type'],
                $error['message'],
                $error['file'],
                $error['line'],
                $vars
            );
        }
        if (\in_array($error['type'], array(E_USER_ERROR, E_RECOVERABLE_ERROR))) {
            $this->onUserError($error);
        }
        if ($error['continueToNormal']) {
            // PHP will log the error
            // if E_USER_ERROR, php will exit()
            return false;
        }
        return true;
    }
Error handler

@param integer $errType the level of the error
@param string  $errMsg  the error message
@param string  $file    filepath the error was raised in
@param string  $line    the line the error was raised in
@param array   $vars    active symbol table at point error occured

@return boolean
@link   http://php.net/manual/en/function.set-error-handler.php
@link   http://php.net/manual/en/language.operators.errorcontrol.php