summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2011-04-23 00:45:32 +1000
committerSavetheinternet <savetheinternet@n0v4.com>2011-04-23 00:45:32 +1000
commita59b8cf1ba22b9bebb3e605f6c8267d4e0fdd4f5 (patch)
tree9f5c045d4ca7ef76dc2d94910f969d35f1d17538 /inc
parent2ac8dc2c0fff26265ab911440b66e4a51923c173 (diff)
error handling
Diffstat (limited to 'inc')
-rw-r--r--inc/functions.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/inc/functions.php b/inc/functions.php
index e3785298..67104189 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -96,6 +96,13 @@
memcached_open();
}
+ function fatal_error_handler() {
+ if($error = error_get_last()) {
+ echo 'Caught fatal error: ' . $error['message'] . ' in <strong>' . $error['file'] . '</strong> on line ' . $error['line'];
+ }
+ }
+ register_shutdown_function('fatal_error_handler');
+
// Memcached
function memcached_open() {
global $memcached, $config;