Skip to content

Commit

Permalink
PTPusherEventDispatcher: add @Try@catch block to dispatchEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
royzvibel committed Jul 10, 2014
1 parent 9af9a79 commit 5731b11
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Library/PTPusherEventDispatcher.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5731b11

Please sign in to comment.