Hprose\Service::fatalErrorHandler PHP Method

fatalErrorHandler() public method

public fatalErrorHandler ( )
    public function fatalErrorHandler()
    {
        if (!is_callable($this->userFatalErrorHandler)) {
            return;
        }
        $e = error_get_last();
        if ($e == null) {
            return;
        }
        switch ($e['type']) {
            case E_ERROR:
            case E_PARSE:
            case E_USER_ERROR:
            case E_CORE_ERROR:
            case E_COMPILE_ERROR:
                $error = new ErrorException($e['message'], 0, $e['type'], $e['file'], $e['line']);
                @ob_end_clean();
                $userFatalErrorHandler = $this->userFatalErrorHandler;
                call_user_func($userFatalErrorHandler, $error);
        }
    }