public function handle($type, $message, $file, $line)
    {
        if (self::$catch & $type > 0) {
            self::$error = $message;
            return;
        }
        switch ($type) {
            case E_USER_NOTICE:
            case E_USER_DEPRECATED:
            case E_USER_WARNING:
            case E_USER_ERROR:
                $backtrace = debug_backtrace();
                if (isset($backtrace[2]['file'])) {
                    $file = $backtrace[2]['file'];
                }
                if (isset($backtrace[2]['line'])) {
                    $line = $backtrace[2]['line'];
                }
                break;
        }
        switch ($type) {
            case E_USER_ERROR:
            case E_ERROR:
            case E_RECOVERABLE_ERROR:
                throw new ErrorException($message, 0, $type, $file, $line);
            default:
                $this->logger->log($this->map[$type], self::$strings[$type] . ': ' . $message, array(
                    'file' => $file,
                    'line' => $line,
                    'code' => $type
                ));
        }
    }
public function handle($type, $message, $file, $line)
    {
        if (self::$catch & $type > 0) {
            self::$error = $message;
            return;
        }
        switch ($type) {
            case E_USER_NOTICE:
            case E_USER_DEPRECATED:
            case E_USER_WARNING:
            case E_USER_ERROR:
                $backtrace = debug_backtrace();
                if (isset($backtrace[2]['file'])) {
                    $file = $backtrace[2]['file'];
                }
                if (isset($backtrace[2]['line'])) {
                    $line = $backtrace[2]['line'];
                }
                break;
        }
        switch ($type) {
            case E_USER_ERROR:
            case E_ERROR:
            case E_RECOVERABLE_ERROR:
                throw new ErrorException($message, 0, $type, $file, $line);
            default:
                $this->logger->log($this->map[$type], self::$strings[$type] . ': ' . $message, array(
                    'file' => $file,
                    'line' => $line,
                    'code' => $type
                ));
        }
    }
public function handle ( $ type , $ message , $ file , $ line ) { if ( self :: $ catch & $ type > 0 ) { self :: $ error = $ message ; return ; } switch ( $ type ) { case E_USER_NOTICE : case E_USER_DEPRECATED : case E_USER_WARNING : case E_USER_ERROR : $ backtrace = debug_backtrace ( ) ; if ( isset ( $ backtrace [ 2 ] [ 'file' ] ) ) { $ file = $ backtrace [ 2 ] [ 'file' ] ; } if ( isset ( $ backtrace [ 2 ] [ 'line' ] ) ) { $ line = $ backtrace [ 2 ] [ 'line' ] ; } break ; } switch ( $ type ) { case E_USER_ERROR : case E_ERROR : case E_RECOVERABLE_ERROR : throw new ErrorException ( $ message , 0 , $ type , $ file , $ line ) ; default : $ this -> logger -> log ( $ this -> map [ $ type ] , self :: $ strings [ $ type ] . ': ' . $ message , array ( 'file' => $ file , 'line' => $ line , 'code' => $ type ) ) ; } }
Handle error.

@param int $type
Error type.
@param string $message
Error message.
@param string $file
File.
@param int $line
Line.
@throws ErrorException To convert errors (E_USER_ERROR, E_ERROR, and
E_RECOVERABLE_ERROR) to exceptions.
Handle error .