Beispiel #1
0
    function defaultError($status, $message, $response)
    {
        $trace = debug_backtrace();
        if (is_object($message) && is_subclass_of($message, 'Exception')) {
            $trace = $message->getTrace();
            $message = $message->getMessage();
        }
        if (defined('DESTRUCT')) {
            die($message);
        }
        $view = new Plank_View('Errors', 'Error503');
        $view->error = '		
		<p>Something\'s drastically wrong. Sorry about this, this is a last-ditch fail message, caused by terror upon terror to have been inflicted upon my poor innocent paradiems. Nothing\'s worked. The thing you asked for? Failed. The recovery from error system? Broken. The error display system itself? F****d. I have no idea what to try next, so I\'m going to throw data at you until you go away.</p>
				
		<h2>' . $message . '</h2>
		
		';
        $view->error .= Plank_Error::getBacktrace($trace);
        $response->setContent($view->render());
        $response->respond();
        if (defined("TEXTMODE")) {
            echo "Uh-Oh\n";
            echo striptags($view->error);
            die;
        } else {
            echo Plank_Logger_Display::display();
        }
    }
Beispiel #2
0
	color: blue;
}

span.prefix {
	color: green;
}

span.action {
	color: purple;
}
</style>
</head>
<body>
<div class="error">
	<h1>Plank - Exception</h1>
	
	<h2><?php 
echo $exception->getMessage();
?>
</h2>
	
	<p>Stack trace follows:</p>
	<?php 
echo Plank_Error::getBacktrace($exception->getTrace());
?>
		
	<p class="smallprint">This is Plank. Plank is the thing behind this website. It was written by Nicholas Avenell in 2009</p>
		
</div>