Skip to content

Instantly share code, notes, and snippets.

@fishcakez
Created September 18, 2014 19:58
Show Gist options
  • Save fishcakez/784500d5390c629e0af8 to your computer and use it in GitHub Desktop.
Save fishcakez/784500d5390c629e0af8 to your computer and use it in GitHub Desktop.
try do
is_atom(atom) or :erlang.error(:badarg)
else
true ->
:atom
rescue
x in [ArgumentError] ->
:not_atom
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment