Skip to content

Commit

Permalink
Remove stacktrace warning
Browse files Browse the repository at this point in the history
  • Loading branch information
felipesere committed Oct 12, 2019
1 parent 2db7a65 commit 67198dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/display/failure.ex
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ defmodule Display.Failure do
end

defp format_error(error) do
trace = System.stacktrace() |> Enum.take(2)
trace = :erlang.get_stacktrace() |> Enum.take(2)
Paint.red(Exception.format(:error, error, trace))
end

Expand Down
2 changes: 1 addition & 1 deletion lib/execute.ex
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ defmodule Execute do

defp expand(error, module) do
{file, line} =
System.stacktrace()
:erlang.get_stacktrace()
|> Enum.drop_while(&(!in_koan?(&1, module)))
|> List.first()
|> extract_file_and_line
Expand Down

0 comments on commit 67198dc

Please sign in to comment.