Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Wrap processJob method in AppDelegate in a try/catch

  • Loading branch information...
commit 8f08ec225998be723b04216b499af4bb0890e84b 1 parent 33dcdcf
@dongle dongle authored
Showing with 9 additions and 4 deletions.
  1. +9 −4 Project/queue/EDAppDelegate.m
View
13 Project/queue/EDAppDelegate.m
@@ -41,10 +41,15 @@ - (EDQueueResult)queue:(EDQueue *)queue processJob:(NSDictionary *)job
{
sleep(1);
- if ([[job objectForKey:@"task"] isEqualToString:@"success"]) {
- return EDQueueResultSuccess;
- } else if ([[job objectForKey:@"task"] isEqualToString:@"fail"]) {
- return EDQueueResultFail;
+ @try {
+ if ([[job objectForKey:@"task"] isEqualToString:@"success"]) {
+ return EDQueueResultSuccess;
+ } else if ([[job objectForKey:@"task"] isEqualToString:@"fail"]) {
+ return EDQueueResultFail;
+ }
+ }
+ @catch (NSException *exception) {
+ return EDQueueResultCritical;
}
return EDQueueResultCritical;
Please sign in to comment.
Something went wrong with that request. Please try again.