Exemplo n.º 1
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

	<title><?php 
echo StatusCode::http_header_for($code);
?>
</title>
	
	<style type="text/css" media="screen">
		BODY {
			font-family: verdana, tahoma, arial, helvetica, sans-serif;
			font-size: 12px;
			margin: 0px;
			padding: 16px;
		}
		
		CODE {
			margin: 0px;
			padding: 0px;
		}
		
		A {
			color: #000;
		}
		
		A:hover {
			background-color: #F5F5F5;
Exemplo n.º 2
0
 function process_exception($object)
 {
     $this->error = $object;
     $this->message = $object->getMessage();
     $this->details = $object->getDetails();
     $this->code = $object->getCode();
     $this->trace = $object->getTrace();
     if ($this->code != 0) {
         header(StatusCode::http_header_for($this->code));
     }
     $paths = array('_errors', 'framework/_errors');
     foreach ($paths as $path) {
         if (is_file(APP_ROOT . '/' . $path . '/' . $this->code . '.' . Framework::$views_extension)) {
             $view_file = APP_ROOT . '/' . $path . '/' . $this->code . '.' . Framework::$views_extension;
             break;
         } elseif (is_file(APP_ROOT . '/' . $path . '/default.' . Framework::$views_extension)) {
             $view_file = APP_ROOT . '/' . $path . '/default.' . Framework::$views_extension;
             break;
         }
     }
     if (StatusCode::can_has_body($this->code)) {
         $this->render_file($view_file);
     }
 }