Skip to content

Instantly share code, notes, and snippets.

@acnalesso
Created December 23, 2014 11:44
Show Gist options
  • Save acnalesso/18db50023b1c4d50dedb to your computer and use it in GitHub Desktop.
Save acnalesso/18db50023b1c4d50dedb to your computer and use it in GitHub Desktop.
queue#invokeWithOnError
invokeWithOnError: function(target, method, args, onError, errorRecordedForStack) {
try {
if (args && args.length > 0) {
method.apply(target, args);
} else {
method.call(target);
}
} catch(error) {
onError(error, errorRecordedForStack);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment