summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-01-28 22:05:14 -0800
committerBrion Vibber <brion@pobox.com>2010-01-28 22:05:14 -0800
commit288dc3452f3c274d2165d8e7d502631a6eacc97c (patch)
treef2aab3d426748f8acb3358cc31d5c9bd6638c934
parent864ce8e276220262ef8a26a9138c929145ccf57e (diff)
Log exceptions from queuedaemon.php if they're not already caught
-rwxr-xr-xscripts/queuedaemon.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/queuedaemon.php b/scripts/queuedaemon.php
index c2e2351c3..30a8a9602 100755
--- a/scripts/queuedaemon.php
+++ b/scripts/queuedaemon.php
@@ -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');