Skip to content

Instantly share code, notes, and snippets.

@dvliman
Created July 17, 2015 17:53
Show Gist options
  • Save dvliman/1f05e02d6e7f45a5f3e0 to your computer and use it in GitHub Desktop.
Save dvliman/1f05e02d6e7f45a5f3e0 to your computer and use it in GitHub Desktop.
([email protected])13> try lists:foreach(fun(Y) -> case Y == 3 of true -> throw(return_atom); false -> ok end end, [1,2,3,4,5]) catch Reason -> io:format("got:~p", [Reason]) end.
got:return_atomok
([email protected])14> try lists:foreach(fun( Y ) -> case Y == 3 of true -> throw(bad_atom); false -> ok end end, [1,2,3,4,5]) catch Reason -> io:format("got: ~p", [Reason]) end.
** exception throw: bad_atom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment