Beispiel #1
0
function HandleException($e)
{
    try {
        if ($e instanceof ErrorNotFound) {
            dispatcher::executeControllerAction("error", "notfound", array($e->getMessage(), $e->getTraceAsString()));
        } elseif ($e instanceof ErrorNotAllowed) {
            dispatcher::executeControllerAction("error", "notallowed", array($e->getMessage(), $e->getTraceAsString()));
        } else {
            #die("Unhandled error: ".$e->getMessage()."\n".
            #	$e->getTraceAsString());
            dispatcher::executeControllerAction("error", "unkownexception", array($e->getMessage(), $e->getTraceAsString()));
        }
    } catch (Exception $e) {
        die("DOUBLEFAULT: " . $e->getMessage() . "\n" . $e->getTraceAsString());
    }
}