Revision 1647
Added by darkviper over 13 years ago
| globalExceptionHandler.php | ||
|---|---|---|
| 42 | 42 |
$sResponse = $_SERVER['SERVER_PROTOCOL'].' 403 Forbidden'; |
| 43 | 43 |
header($sResponse); |
| 44 | 44 |
echo $e; |
| 45 |
}elseif($e instanceof RuntimeException) {
|
|
| 46 |
$out ='There was a serious runtime error:'."\n"; |
|
| 47 |
$out .= $e->getMessage()."\n"; |
|
| 48 |
$out .= 'in line ('.$e->getLine().') of ('.$file.')'."\n";
|
|
| 49 |
echo $out; |
|
| 45 | 50 |
}else {
|
| 46 | 51 |
// default exception handling |
| 47 | 52 |
$out = 'There was an unknown exception:'."\n"; |
Also available in: Unified diff
add additional exeptionhandling in globalExceptionHandler