Skip to content

Instantly share code, notes, and snippets.

@txrev319
Created November 16, 2013 22:57
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 txrev319/7506522 to your computer and use it in GitHub Desktop.
Save txrev319/7506522 to your computer and use it in GitHub Desktop.
catcher(N) ->
try generate_exception(N) of
Val -> {N, normal, Val}
catch
throw: X -> {N, caught, thrown, X};
exit:X -> {N, caught, exited, X};
error:X -> {N, caught, error, X}
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment