Suppose I have something like this :
try code_that_fails() catch _:_ -> .....
How do I print the stacktrace in the catch block? That block c
An answer for your question is:
io:format("Backtrace ~p~n", [erlang:get_stacktrace()])
The current function is at the head of the list. Read more in man 3erl erlang or erlang:get_stacktrace/0
man 3erl erlang