Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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