protected function buildError($errType, $errMsg, $file, $line, $vars)
    {
        // determine $category
        foreach ($this->errCategories as $category => $errTypes) {
            if (\in_array($errType, $errTypes)) {
                break;
            }
        }
        $errorValues = array(
            'type'      => $errType,                    // int
            'typeStr'   => $this->errTypes[$errType],   // friendly string version of 'type'
            'category'  => $category,
            'message'   => $errMsg,
            'file'      => $file,
            'line'      => $line,
            'vars'      => $vars,
            'backtrace' => array(), // only for fatal type errors, and only if xdebug is enabled
            'continueToNormal' => false,    // aka, let PHP do its thing (log error)
            'continueToPrevHandler' => $this->cfg['continueToPrevHandler'] && $this->prevErrorHandler,
            'exception' => $this->uncaughtException,  // non-null if error is uncaught-exception
            'hash'          => null,
            'isFirstOccur'  => true,
            'isHtml'        => \filter_var(\ini_get('html_errors'), FILTER_VALIDATE_BOOLEAN)
                && !\in_array($errType, $this->userErrors) && !$this->uncaughtException,
            'isSuppressed'  => false,
        );
        $hash = $this->errorHash($errorValues);
        $isFirstOccur = !isset($this->data['errors'][$hash]);
        // if any instance of this error was not supprssed, reflect that
        if ($errorValues['isHtml']) {
            $errorValues['message'] = \str_replace('<a ', '<a target="phpRef" ', $errorValues['message']);
        }
        $isSuppressed = !$isFirstOccur && !$this->data['errors'][$hash]['isSuppressed']
            ? false
            : \error_reporting() === 0;
        if (!empty($this->data['errorCaller'])) {
            $errorValues['file'] = $this->data['errorCaller']['file'];
            $errorValues['line'] = $this->data['errorCaller']['line'];
        }
        if (\in_array($errType, array(E_ERROR, E_USER_ERROR))) {
            // will return empty unless xdebug extension installed/enabled
            $errorValues['backtrace'] = $this->backtrace($errorValues);
        }
        $errorValues = \array_merge($errorValues, array(
            'continueToNormal' => !$isSuppressed && $isFirstOccur,
            'hash' => $hash,
            'isFirstOccur' => $isFirstOccur,
            'isSuppressed' => $isSuppressed,
        ));
        return new Event($this, $errorValues);
    }
protected function buildError($errType, $errMsg, $file, $line, $vars)
    {
        // determine $category
        foreach ($this->errCategories as $category => $errTypes) {
            if (\in_array($errType, $errTypes)) {
                break;
            }
        }
        $errorValues = array(
            'type'      => $errType,                    // int
            'typeStr'   => $this->errTypes[$errType],   // friendly string version of 'type'
            'category'  => $category,
            'message'   => $errMsg,
            'file'      => $file,
            'line'      => $line,
            'vars'      => $vars,
            'backtrace' => array(), // only for fatal type errors, and only if xdebug is enabled
            'continueToNormal' => false,    // aka, let PHP do its thing (log error)
            'continueToPrevHandler' => $this->cfg['continueToPrevHandler'] && $this->prevErrorHandler,
            'exception' => $this->uncaughtException,  // non-null if error is uncaught-exception
            'hash'          => null,
            'isFirstOccur'  => true,
            'isHtml'        => \filter_var(\ini_get('html_errors'), FILTER_VALIDATE_BOOLEAN)
                && !\in_array($errType, $this->userErrors) && !$this->uncaughtException,
            'isSuppressed'  => false,
        );
        $hash = $this->errorHash($errorValues);
        $isFirstOccur = !isset($this->data['errors'][$hash]);
        // if any instance of this error was not supprssed, reflect that
        if ($errorValues['isHtml']) {
            $errorValues['message'] = \str_replace('<a ', '<a target="phpRef" ', $errorValues['message']);
        }
        $isSuppressed = !$isFirstOccur && !$this->data['errors'][$hash]['isSuppressed']
            ? false
            : \error_reporting() === 0;
        if (!empty($this->data['errorCaller'])) {
            $errorValues['file'] = $this->data['errorCaller']['file'];
            $errorValues['line'] = $this->data['errorCaller']['line'];
        }
        if (\in_array($errType, array(E_ERROR, E_USER_ERROR))) {
            // will return empty unless xdebug extension installed/enabled
            $errorValues['backtrace'] = $this->backtrace($errorValues);
        }
        $errorValues = \array_merge($errorValues, array(
            'continueToNormal' => !$isSuppressed && $isFirstOccur,
            'hash' => $hash,
            'isFirstOccur' => $isFirstOccur,
            'isSuppressed' => $isSuppressed,
        ));
        return new Event($this, $errorValues);
    }
protected function buildError ( $ errType , $ errMsg , $ file , $ line , $ vars ) { // determine $category foreach ( $ this -> errCategories as $ category => $ errTypes ) { if ( \ in_array ( $ errType , $ errTypes ) ) { break ; } } $ errorValues = array ( 'type' => $ errType , // int 'typeStr' => $ this -> errTypes [ $ errType ] , // friendly string version of 'type' 'category' => $ category , 'message' => $ errMsg , 'file' => $ file , 'line' => $ line , 'vars' => $ vars , 'backtrace' => array ( ) , // only for fatal type errors, and only if xdebug is enabled 'continueToNormal' => false , // aka, let PHP do its thing (log error) 'continueToPrevHandler' => $ this -> cfg [ 'continueToPrevHandler' ] && $ this -> prevErrorHandler , 'exception' => $ this -> uncaughtException , // non-null if error is uncaught-exception 'hash' => null , 'isFirstOccur' => true , 'isHtml' => \ filter_var ( \ ini_get ( 'html_errors' ) , FILTER_VALIDATE_BOOLEAN ) && ! \ in_array ( $ errType , $ this -> userErrors ) && ! $ this -> uncaughtException , 'isSuppressed' => false , ) ; $ hash = $ this -> errorHash ( $ errorValues ) ; $ isFirstOccur = ! isset ( $ this -> data [ 'errors' ] [ $ hash ] ) ; // if any instance of this error was not supprssed, reflect that if ( $ errorValues [ 'isHtml' ] ) { $ errorValues [ 'message' ] = \ str_replace ( '<a ' , '<a target="phpRef" ' , $ errorValues [ 'message' ] ) ; } $ isSuppressed = ! $ isFirstOccur && ! $ this -> data [ 'errors' ] [ $ hash ] [ 'isSuppressed' ] ? false : \ error_reporting ( ) === 0 ; if ( ! empty ( $ this -> data [ 'errorCaller' ] ) ) { $ errorValues [ 'file' ] = $ this -> data [ 'errorCaller' ] [ 'file' ] ; $ errorValues [ 'line' ] = $ this -> data [ 'errorCaller' ] [ 'line' ] ; } if ( \ in_array ( $ errType , array ( E_ERROR , E_USER_ERROR ) ) ) { // will return empty unless xdebug extension installed/enabled $ errorValues [ 'backtrace' ] = $ this -> backtrace ( $ errorValues ) ; } $ errorValues = \ array_merge ( $ errorValues , array ( 'continueToNormal' => ! $ isSuppressed && $ isFirstOccur , 'hash' => $ hash , 'isFirstOccur' => $ isFirstOccur , 'isSuppressed' => $ isSuppressed , ) ) ; return new Event ( $ this , $ errorValues ) ; }
Build error object

Error object is simply an event object

@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 Event
Build error object