public function handle(\Exception $e)
    {
        $httpCode = 500;
        // create http response header
        if (property_exists($e, 'httpCode') && 
           array_key_exists($e->httpCode, Response::$statusCodes)
        ) { // is a http exception
            $httpCode = $e->httpCode;
            $header = Response::$statusCodes[$httpCode];
        } else { // other exception
            $header = Response::$statusCodes[$httpCode];
            Error::printError($e); // if Server error, echo to stdout
        }

        Response::header($header);    

        return Error::errorHtml($e, $header, Config::get('app.debug'));
    }
public function handle(\Exception $e)
    {
        $httpCode = 500;
        // create http response header
        if (property_exists($e, 'httpCode') && 
           array_key_exists($e->httpCode, Response::$statusCodes)
        ) { // is a http exception
            $httpCode = $e->httpCode;
            $header = Response::$statusCodes[$httpCode];
        } else { // other exception
            $header = Response::$statusCodes[$httpCode];
            Error::printError($e); // if Server error, echo to stdout
        }

        Response::header($header);    

        return Error::errorHtml($e, $header, Config::get('app.debug'));
    }
public function handle ( \ Exception $ e ) { $ httpCode = 500 ; // create http response header if ( property_exists ( $ e , 'httpCode' ) && array_key_exists ( $ e -> httpCode , Response :: $ statusCodes ) ) { // is a http exception $ httpCode = $ e -> httpCode ; $ header = Response :: $ statusCodes [ $ httpCode ] ; } else { // other exception $ header = Response :: $ statusCodes [ $ httpCode ] ; Error :: printError ( $ e ) ; // if Server error, echo to stdout } Response :: header ( $ header ) ; return Error :: errorHtml ( $ e , $ header , Config :: get ( 'app.debug' ) ) ; }
ExceptionHandler handle.

@param \Exception $e
@return string
ExceptionHandler handle .