Last active
December 30, 2015 00:28
-
-
Save abolibibelot/7749397 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try unsafe(PVS) of | |
Res -> Res | |
catch | |
A:B -> lager:error("Problem:~p stacktrace:~p",[[A,B], erlang:get_stacktrace()]), | |
case {A,B} of | |
{exit,_} -> exit(B); | |
{error,_} -> error(B); | |
{exception,_} -> throw(B) | |
end | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This one is better:
try unsafe(PVS) of
Res -> Res
catch
A:B ->
St = erlang:get_stacktrace(),
lager:error("Problem:~p stacktrace:~p",[[A,B], St]),
erlang:raise(A,B,St)
end.