]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
error handler in xmppdaemon
authorEvan Prodromou <evan@prodromou.name>
Wed, 16 Jul 2008 05:49:32 +0000 (01:49 -0400)
committerEvan Prodromou <evan@prodromou.name>
Wed, 16 Jul 2008 05:49:32 +0000 (01:49 -0400)
darcs-hash:20080716054932-84dde-4c7c65cb1b5fb1d3b1b15409e092b40285d6cfd0.gz

xmppdaemon.php

index 9aaa953fd0c3016e027c579b889bf164e3942247..c8e2ba16f14ddc834002c32f9534af4356e2c9f1 100755 (executable)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+function xmppdaemon_error_handler($errno, $errstr, $errfile, $errline, $errcontext) {
+       print "Error $errno in $errfile[$errline]: $errstr\n";
+       die();
+}
+
+set_error_handler('xmppdaemon_error_handler');
+
 # Abort if called from a web server
 if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
        print "This script must be run from the command line\n";