-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrorLayout.php
More file actions
97 lines (78 loc) · 2.29 KB
/
errorLayout.php
File metadata and controls
97 lines (78 loc) · 2.29 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!doctype html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title><?= $title; ?></title>
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<style>
body {
padding: 0;
font-family: sans-serif;
font-weight: 400;
font-family: 'Montserrat', sans-serif;
background-color: #f0f0f1;
}
a {
color: #a56259;
}
.error__content {
width: 50%;
margin: 0 auto;
}
.error__message {
margin-top: 2.5em;
color: #465256;
}
.error__title {
margin-bottom: 0;
color: #ec6858;
font-weight: 700;
text-transform: uppercase;
}
.error__backtrace {
font-family: monospace;
color: #465256;
}
.error__backtrace__line {
color: #ec6858;
}
#backtrace {
display: none;
}
</style>
<?php if(!empty($customStyle)): ?>
<link rel="stylesheet" href="<?= $customStyle; ?>"/>
<?php endif; ?>
</head>
<body>
<div class="error__content">
<h1 class="error__title"><?= $title; ?></h1>
<p class="error__message"><?= $message; ?></p>
<?php if(isset($backtrace)): ?>
<p class="error__backtrace"><?= $file; ?> <span class="error__backtrace__line">l: <?= $line; ?></span></p>
<a id="backtraceLink" href="#backtrace">Voir le backtrace complet</a>
<div id="backtrace">
<?= var_dump($backtrace); ?>
</div>
<?php endif; ?>
</div>
<script>
var bShown = false;
var backtrace = document.querySelector( "#backtrace"),
backtraceLink = document.querySelector( "#backtraceLink" );
function toggleBacktrace( e ) {
e.preventDefault();
if ( !bShown ) {
backtraceLink.innerHTML = "Masquer le backtrace︎";
backtrace.style.display = "block"
bShown = true;
} else {
backtraceLink.innerHTML = "Voir le backtrace complet";
backtrace.style.display = "none"
bShown = false;
}
}
backtraceLink.addEventListener( "click", toggleBacktrace, false );
</script>
</body>
</html>