From 5731b119c3fe11a7bf03c6841c410b188bbafb93 Mon Sep 17 00:00:00 2001 From: Roy Zvibel Date: Thu, 10 Jul 2014 15:46:50 +0300 Subject: [PATCH] PTPusherEventDispatcher: add @try@catch block to dispatchEvent --- Library/PTPusherEventDispatcher.m | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Library/PTPusherEventDispatcher.m b/Library/PTPusherEventDispatcher.m index c2936d7a..c024ee8c 100644 --- a/Library/PTPusherEventDispatcher.m +++ b/Library/PTPusherEventDispatcher.m @@ -65,9 +65,14 @@ - (void)removeAllBindings - (void)dispatchEvent:(PTPusherEvent *)event { - for (PTPusherEventBinding *binding in _bindings[event.name]) { - [binding dispatchEvent:event]; - } + @try { + for (PTPusherEventBinding *binding in _bindings[event.name]) { + [binding dispatchEvent:event]; + } + } + @catch (NSException *exception) { + NSLog(@"Exception raised on PTPusherEventDispatcher: dispatchEvent: %@",[exception description]); + } } @end