]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Log exceptions from queuedaemon.php if they're not already caught
authorBrion Vibber <brion@pobox.com>
Fri, 29 Jan 2010 06:05:14 +0000 (22:05 -0800)
committerBrion Vibber <brion@pobox.com>
Fri, 29 Jan 2010 06:05:14 +0000 (22:05 -0800)
scripts/queuedaemon.php

index c2e2351c3910e307331303c0509e30692f89b012..30a8a9602630e439ca16736d829f25bbb10d6ce8 100755 (executable)
@@ -109,7 +109,13 @@ class QueueDaemon extends SpawningDaemon
 
         $master = new QueueMaster($this->get_id());
         $master->init($this->all);
-        $master->service();
+        try {
+            $master->service();
+        } catch (Exception $e) {
+            common_log(LOG_ERR, "Unhandled exception: " . $e->getMessage() . ' ' .
+                str_replace("\n", " ", $e->getTraceAsString()));
+            return self::EXIT_ERR;
+        }
 
         $this->log(LOG_INFO, 'finished servicing the queue');