From e628c9f4b9676b8e71d85aa1c2b87274ce921f0e Mon Sep 17 00:00:00 2001 From: Matt Newman Date: Wed, 2 May 2018 11:45:17 -0600 Subject: [PATCH] Throw exception instead of just exiting If failed to put message on the bus, we need to throw an exception instead of just exiting. This is leading to problems where the errors are swallowed and we aren't seeing why events aren't getting onto bus. Eventually, we need to add retries for this too. --- src/lib/Combiner.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lib/Combiner.php b/src/lib/Combiner.php index 949001d..58ecaf9 100644 --- a/src/lib/Combiner.php +++ b/src/lib/Combiner.php @@ -83,10 +83,7 @@ private function submitBatch() { call_user_func($this->checkpointer,$result); } if(!$result['success']) { - /** - * @todo we need to kill this process osmehow - */ - exit(); + throw new \Exception("Could not put message on bus - result is: " . $result); } } } @@ -170,4 +167,4 @@ public function end() { $this->reset(); $this->uploader->end(); } -} \ No newline at end of file +}