Esempio n. 1
0
class X
{
    const author = '逆雪寒';
    const version = '1.0.1';
    const license = "MIT";
}
define('YES', 1);
define('NO', 0);
set_exception_handler(function ($e) {
    $className = get_class($e);
    if ($fn = Koala::getErrorhandler('DefaultException')) {
        $fn();
        exit;
    }
    if ($fn = Koala::getErrorhandler($className)) {
        $fn();
        exit;
    }
    $msg = sprintf('<h2>Koala Error</h2>' . '<pre>%s <br/>%s</pre>', $e->getMessage(), $e->getTraceAsString());
    Koala::$app->Response->halt(500, $msg);
});
class C
{
}
class KoalaException extends \Exception
{
}
class MysqlException extends \PDOException
{
}