Skip to content

Commit 3ce0296

Browse files
author
José Valim
committed
Do not expect stacktraces to be always present, closes #4840
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
1 parent 416bf41 commit 3ce0296

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/elixir/src/elixir_locals.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ local_for(Module, Name, Arity, Given) ->
3131
{Kind, Ann, [_ | _] = Clauses} when Given == nil; Kind == Given ->
3232
get_function(Ann, Module, Clauses);
3333
_ ->
34-
[_ | T] = erlang:get_stacktrace(),
34+
{current_stacktrace, [_ | T]} = erlang:process_info(self(), current_stacktrace),
3535
erlang:raise(error, undef, [{Module, Name, Arity, []} | T])
3636
end.
3737

0 commit comments

Comments
 (0)