예제 #1
0
        }
        throw new Exception(self::format_errno($errno) . ': ' . $errstr);
    }
    private static function format_errno($errno)
    {
        switch ($errno) {
            case E_WARNING:
                return 'E_WARNING';
            case E_NOTICE:
                return 'E_NOTICE';
            case E_USER_ERROR:
                return 'E_USER_ERROR';
            case E_USER_WARNING:
                return 'E_USER_WARNING';
            case E_USER_NOTICE:
                return 'E_USER_NOTICE';
            case E_STRICT:
                return 'E_STRICT';
            case E_RECOVERABLE_ERROR:
                return 'E_RECOVERABLE_ERROR';
            case E_DEPRECATED:
                return 'E_DEPRECATED';
            case E_USER_DEPRECATED:
                return 'E_USER_DEPRECATED';
            default:
                return "Unknown error type [{$errno}]";
        }
    }
}
ErrorHandler::install();
예제 #2
0
파일: Session.php 프로젝트: mlessnau/pry
 public static function create($mainScriptPath)
 {
     self::$instances[] = new self($mainScriptPath);
     ErrorHandler::install();
 }