Skip to content

Instantly share code, notes, and snippets.

@jamescarr
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save jamescarr/50772e34c4a6676514f7 to your computer and use it in GitHub Desktop.

Select an option

Save jamescarr/50772e34c4a6676514f7 to your computer and use it in GitHub Desktop.
handle(function() {
doSomething("with", "params");
});
function handle(fn) {
try {
fn();
} catch(e) {
var result = doOtherThings();
if (!result) {
throw e;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment