summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Cochrane <mikec@mikenz.geek.nz>2008-07-22 02:46:07 -0400
committerMike Cochrane <mikec@mikenz.geek.nz>2008-07-22 02:46:07 -0400
commitef946142b460bf0e060ed0eab7b42b181ec06380 (patch)
treef62da880f3fa6aebb50cd972fad05b1b3ae825e3
parenta4fa34cecbd038fb2cc323aefd2b32739aaee7d5 (diff)
Add error file and line to the xmppdaemon error handler
darcs-hash:20080722064607-533db-c902d49bc97b74064e5a7ca2b91c4577f5256fbd.gz
-rwxr-xr-xxmppdaemon.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/xmppdaemon.php b/xmppdaemon.php
index 91ea833ce..d9b706454 100755
--- a/xmppdaemon.php
+++ b/xmppdaemon.php
@@ -21,23 +21,23 @@
function xmppdaemon_error_handler($errno, $errstr, $errfile, $errline, $errcontext) {
switch ($errno) {
case E_USER_ERROR:
- echo "ERROR: [$errno] $errstr\n";
+ echo "ERROR: [$errno] $errstr ($errfile:$errline)\n";
echo " Fatal error on line $errline in file $errfile";
echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")\n";
echo "Aborting...\n";
exit(1);
break;
- case E_USER_WARNING:
- echo "WARNING [$errno] $errstr\n";
+ case E_USER_WARNING:
+ echo "WARNING [$errno] $errstr ($errfile:$errline)\n";
break;
case E_USER_NOTICE:
- echo "My NOTICE [$errno] $errstr\n";
+ echo "My NOTICE [$errno] $errstr ($errfile:$errline)\n";
break;
default:
- echo "Unknown error type: [$errno] $errstr\n";
+ echo "Unknown error type: [$errno] $errstr ($errfile:$errline)\n";
break;
}