public static function errorHandlerForFatal(
        $errno,
        $errstr,
        $errfile = null,
        $errline = null
    ) {
        $code = self::$_defaultCode;
        self::stopErrorHandlerForFatal();

        if ($errstr instanceof Exception) {
            if ($errstr->getCode()) {
                $code = $errstr->getCode();
            }
            $errstr = $errstr->getMessage();
        } elseif (!is_string($errstr)) {
            $errstr = 'Unknown error';
        }

        throw new SoapFault($code, $errstr.' (error ['.$errno.'])');
    }
public static function errorHandlerForFatal(
        $errno,
        $errstr,
        $errfile = null,
        $errline = null
    ) {
        $code = self::$_defaultCode;
        self::stopErrorHandlerForFatal();

        if ($errstr instanceof Exception) {
            if ($errstr->getCode()) {
                $code = $errstr->getCode();
            }
            $errstr = $errstr->getMessage();
        } elseif (!is_string($errstr)) {
            $errstr = 'Unknown error';
        }

        throw new SoapFault($code, $errstr.' (error ['.$errno.'])');
    }
public static function errorHandlerForFatal ( $ errno , $ errstr , $ errfile = null , $ errline = null ) { $ code = self :: $ _defaultCode ; self :: stopErrorHandlerForFatal ( ) ; if ( $ errstr instanceof Exception ) { if ( $ errstr -> getCode ( ) ) { $ code = $ errstr -> getCode ( ) ; } $ errstr = $ errstr -> getMessage ( ) ; } elseif ( ! is_string ( $ errstr ) ) { $ errstr = 'Unknown error' ; } throw new SoapFault ( $ code , $ errstr . ' (error [' . $ errno . '])' ) ; }
handling the error to catch fatal errors.

@param int              $errno   error number
@param string|exception $errstr  error message
@param string           $errfile file of the error
@param int              $errline line of the error

@throws SoapFault
handling the error to catch fatal errors .