You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
1.7 KiB
87 lines
1.7 KiB
11 years ago
|
<?php
|
||
|
/**
|
||
|
* @var \Exception $exception
|
||
11 years ago
|
* @var \yii\base\ErrorHandler $handler
|
||
11 years ago
|
*/
|
||
11 years ago
|
if ($exception instanceof \yii\web\HttpException) {
|
||
|
$code = $exception->statusCode;
|
||
|
} else {
|
||
|
$code = $exception->getCode();
|
||
|
}
|
||
|
if ($exception instanceof \yii\base\Exception) {
|
||
|
$name = $exception->getName();
|
||
|
} else {
|
||
|
$name = 'Error';
|
||
|
}
|
||
|
if ($code) {
|
||
|
$name .= " (#$code)";
|
||
|
}
|
||
|
|
||
|
if ($exception instanceof \yii\base\UserException) {
|
||
|
$message = $exception->getMessage();
|
||
|
} else {
|
||
|
$message = 'An internal server error occurred.';
|
||
|
}
|
||
11 years ago
|
?>
|
||
11 years ago
|
<?php if (method_exists($this, 'beginPage')) $this->beginPage(); ?>
|
||
11 years ago
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="utf-8" />
|
||
11 years ago
|
<title><?= $handler->htmlEncode($name) ?></title>
|
||
11 years ago
|
|
||
|
<style>
|
||
|
body {
|
||
|
font: normal 9pt "Verdana";
|
||
|
color: #000;
|
||
|
background: #fff;
|
||
|
}
|
||
|
|
||
|
h1 {
|
||
|
font: normal 18pt "Verdana";
|
||
|
color: #f00;
|
||
|
margin-bottom: .5em;
|
||
|
}
|
||
|
|
||
|
h2 {
|
||
|
font: normal 14pt "Verdana";
|
||
|
color: #800000;
|
||
|
margin-bottom: .5em;
|
||
|
}
|
||
|
|
||
|
h3 {
|
||
|
font: bold 11pt "Verdana";
|
||
|
}
|
||
|
|
||
|
p {
|
||
|
font: normal 9pt "Verdana";
|
||
|
color: #000;
|
||
|
}
|
||
|
|
||
|
.version {
|
||
|
color: gray;
|
||
|
font-size: 8pt;
|
||
|
border-top: 1px solid #aaa;
|
||
|
padding-top: 1em;
|
||
|
margin-bottom: 1em;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
11 years ago
|
<h1><?= $handler->htmlEncode($name) ?></h1>
|
||
|
<h2><?= nl2br($handler->htmlEncode($message)) ?></h2>
|
||
11 years ago
|
<p>
|
||
|
The above error occurred while the Web server was processing your request.
|
||
|
</p>
|
||
|
<p>
|
||
|
Please contact us if you think this is a server error. Thank you.
|
||
|
</p>
|
||
|
<div class="version">
|
||
11 years ago
|
<?= date('Y-m-d H:i:s', time()) ?>
|
||
11 years ago
|
</div>
|
||
|
<?php if (method_exists($this, 'endBody')) $this->endBody(); // to allow injecting code into body (mostly by Yii Debug Toolbar) ?>
|
||
11 years ago
|
</body>
|
||
|
</html>
|
||
11 years ago
|
<?php if (method_exists($this, 'endPage')) $this->endPage(); ?>
|