5
5
{
6
6
$ lines = file ( $ file );
7
7
}
8
- if (\Gene \Application::getEnvironment ()) {
9
- //echo 'Exception Log!';
10
- //die;
11
- }
12
8
?>
13
9
<!DOCTYPE html>
14
10
<head>
15
11
<meta charset="utf-8">
16
12
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
17
- <title><?php echo $ e -> getMessage (); ?> </title>
13
+ <title>Caught Exception </title>
18
14
<style type="text/css">
19
15
body{padding: 0;margin: 0;}
20
- .content {width: 960px;margin: 0 auto;padding:5px 10px;}
21
- h1, h2{font-weight: bold;color: #AF7C8C;}
22
- ul.code {font-size: 13px;line-height: 20px;color: #68777d;background-color: #f2f9fc;border: 1px solid #c9e6f2;border-radius: 3px;}
16
+ .content {width: 80%;margin: 0 auto;padding:5px 10px;}
17
+ h1{font-weight: bolder;color: #cc7a94;padding: 5px;}
18
+ h2{font-weight: normal;color: #AF7C8C;background-color: #e9f4f5;padding: 5px;}
19
+ ul.code {font-size: 13px;line-height: 20px;color: #68777d;background-color: #f2f9fc;border: 1px solid #c9e6f2;}
23
20
ul.code li {width : 100%;margin:0px;white-space: pre ;list-style-type:none;font-family : monospace;}
24
21
ul.code li.line {color : red;}
25
- table.trace {width : 100%;font-size: 13px;line-height: 20px;color: #68777d;background-color: #f2f9fc;border: 1px solid #c9e6f2;border-radius: 3px;}
26
- table.thead tr {background : rgb(240,240,240);}
27
- table.trace tr.odd {background : #DAEFE9;}
28
- table.trace tr.even {background : #ECF1F0;}
29
- table.trace td {padding : 2px 4px 2px 4px;}
30
- .foot {line-height: 20px;color: #D2D8DA;margin:10px;}
22
+ table.trace {width : 100%;font-size: 13px;line-height: 20px;color: #247696;background-color: #c9e6f2;}
23
+ table.trace thead tr {background-color: #90a9b3;color: white;}
24
+ table.trace tr {background-color: #f2f9fc;}
25
+ table.trace td {padding : 5px;}
26
+ .foot {line-height: 20px;color: #cc7a94;margin:10px;}
31
27
</style>
32
28
</head>
33
29
<body>
34
30
<div class="content">
35
- <center><h1>Uncaught <?php echo get_class ($ e ); ?> </h1></center>
36
- <h2><?php echo $ e ->getMessage (); ?> </h2>
37
- <p>An uncaught <?php echo get_class ($ e ); ?> was thrown on line <?php echo $ line ;?> of file <?php echo basename ( $ file ); ?> that prevented further execution of this request.</p>
38
- <h2>Where it happened:</h2>
31
+
32
+ <center><h1>Caught Exception</h1></center>
33
+
34
+ <h2>What's happened:</h2>
35
+ <code><?php echo $ e ->getMessage (); ?> </code>
36
+
37
+ <h2>Where's happened:</h2>
39
38
<?php if (isset ($ lines )) { ?>
40
39
<code>File:***<?php echo substr ($ file ,-(ceil (strlen ($ file )*0.6 ))); ?> Line:<?php echo $ line ; ?> </code>
41
40
<ul class="code">
42
- <?php for ($ i =$ line -3 ;$ i <$ line +3 ;$ i ++) { ?>
41
+ <?php for ($ i =$ line -8 ;$ i <$ line +8 ;$ i ++) { ?>
43
42
<?php if ($ i >0 && $ i <count ($ lines )) { ?>
44
43
<?php if ($ i == $ line -1 ) { ?>
45
- <li class="line"><?php echo str_replace ( "\n" , "" , $ lines [$ i ] ) ; ?> </li>
44
+ <li class="line"><?php echo $ lines [$ i ]; ?> </li>
46
45
<?php } else { ?>
47
- <li><?php echo str_replace ( "\n" , "" , $ lines [$ i ] ) ; ?> </li>
46
+ <li><?php echo $ lines [$ i ]; ?> </li>
48
47
<?php } ?>
49
48
<?php } ?>
50
49
<?php } ?>
51
50
</ul>
52
51
<?php } ?>
53
52
<?php if (is_array ( $ e ->getTrace () )) { ?>
53
+
54
54
<h2>Stack trace:</h2>
55
55
<table class="trace">
56
- <thead><tr><td>File</td><td>Line</td><td>Class</td><td>Function</td><td>Arguments</td></tr></thead>
56
+ <thead><tr><td width="180px" >File</td><td width="30px" >Line</td><td width="250px" >Class</td><td width="150px" >Function</td><td>Arguments</td></tr></thead>
57
57
<tbody>
58
58
<?php if (is_array ($ e ->getTrace ())) { foreach ($ e ->getTrace () as $ i => $ trace ) { ?>
59
- <?php if (isset ($ trace [ 'class ' ])) { ?>
60
- <tr class=" <?php echo $ i % 2 == 0 ? ' even ' : ' odd ' ; ?> " >
59
+ <?php if (isset ($ trace [ 'class ' ]) && $ trace [ ' function ' ] != " doError " ) { ?>
60
+ <tr>
61
61
<td><?php echo isset ($ trace [ 'file ' ]) ? basename ($ trace [ 'file ' ]) : '' ; ?> </td>
62
- <td><?php echo isset ( $ trace [ 'line ' ]) ? $ trace [ ' line ' ] : '' ; ?> </td>
63
- <td><?php echo isset ( $ trace [ 'class ' ]) ? $ trace [ ' class ' ] : '' ; ?> </td>
64
- <td><?php echo isset ( $ trace [ 'function ' ]) ? $ trace [ ' function ' ] : '' ; ?> </td>
62
+ <td><?php echo $ trace [ 'line ' ] ?? '' ; ?> </td>
63
+ <td><?php echo $ trace [ 'class ' ] ?? '' ; ?> </td>
64
+ <td><?php echo $ trace [ 'function ' ] ?? '' ; ?> </td>
65
65
<td>
66
66
<?php if (isset ($ trace ['args ' ])) { ?>
67
67
<?php if (is_array ($ trace ['args ' ])) { foreach ($ trace ['args ' ] as $ i => $ arg ) { ?>
68
- <span title="<?php echo var_export ( $ arg , true ); ?> "><?php echo gettype ( $ arg ); ?> </span>
69
- <?php echo $ i < count ( $ trace ['args ' ] ) -1 ? ', ' : '' ; ?>
68
+ <span title="<?php echo var_export ( $ arg , true ); ?> "><?php echo gettype ( $ arg ); ?> </span>
70
69
<?php } } ?>
71
70
<?php } else { ?>
72
71
NULL
77
76
<?php } } ?>
78
77
</tbody>
79
78
</table>
80
- <?php } else { ?>
81
- <pre><?php echo $ e ->getTraceAsString (); ?> </pre>
82
79
<?php } ?>
80
+
83
81
<center class="foot">Gene <?php echo gene_version (); ?> </center>
82
+
84
83
</div>
85
84
</body>
86
85
</html>
0 commit comments