/
midcom_error.php
57 lines (48 loc) · 1.52 KB
/
midcom_error.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
$head = midcom::get()->head;
$message = $this->data['error_message'];
$title = $this->data['error_title'];
$exception = $this->data['error_exception'];
?>
<!DOCTYPE html>
<html lang="<?php echo midcom::get()->i18n->get_current_language(); ?>">
<head>
<meta charset="UTF-8">
<title><(title)> OpenPSA</title>
<?php
$head->add_stylesheet(MIDCOM_STATIC_URL . '/OpenPsa2/style.css');
$head->add_stylesheet(MIDCOM_STATIC_URL . '/OpenPsa2/print.css', 'print');
$head->add_stylesheet(MIDCOM_STATIC_URL . '/OpenPsa2/error.css');
$head->print_head_elements();
?>
<link rel="shortcut icon" href="<?php echo MIDCOM_STATIC_URL; ?>/org.openpsa.core/openpsa-16x16.png" />
</head>
<body>
<div class="error-header">
<h1><?php echo $title; ?></h1>
</div>
<p class='error-message'>
<?php echo $message ?>
</p>
<div class="error-exception">
<?php if (!empty($this->data['error_exception'])) {
$e = $this->data['error_exception'];
echo '<p>' . get_class($e) . ' in ' . $e->getFile() . ', line ' . $e->getLine() . "</p>";
}
?>
<?php
$stacktrace = $this->data['error_handler']->get_function_stack();
if (!empty($stacktrace)) {
echo '<h3>Stacktrace:</h3>';
echo "<pre>" . implode("\n", $stacktrace) . "</pre>\n";
}
?>
</div>
<div class="org_openpsa_softwareinfo">
<a href="http://www.openpsa.org/">OpenPSA <?php
echo org_openpsa_core_version::get_version_both();
?></a>,
<a href="http://www.midgard-project.org/">Midgard <?php echo mgd_version(); ?></a>
</div>
</body>
</html>