Created
December 23, 2014 11:44
-
-
Save acnalesso/18db50023b1c4d50dedb to your computer and use it in GitHub Desktop.
queue#invokeWithOnError
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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