Skip to content

Instantly share code, notes, and snippets.

@yangboz
Created February 10, 2014 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yangboz/8917276 to your computer and use it in GitHub Desktop.
Save yangboz/8917276 to your computer and use it in GitHub Desktop.
App42 API call with try...catch block
@try{
//App42 service API call here.
}@catch (App42BadParameterException *ex) {
NSLog(@"BadParameterException found,status code:%d",ex.appErrorCode);
}@catch (App42SecurityException *ex) {
NSLog(@"SecurityException found!");
}@catch (App42Exception *ex) {
NSLog(@"App42 Exception found:%@",ex.description);
//NSAlert here.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment