Skip to content

Commit 65daa3b

Browse files
committed
use the built-in stacktrace formatter
1 parent fcf4cd3 commit 65daa3b

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

lib/scenic/scene.ex

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -637,18 +637,7 @@ defmodule Scenic.Scene do
637637
head_msg = "#{inspect(scene_module)} crashed during init"
638638
err_msg = inspect(err)
639639
args_msg = "args: #{inspect(args)}"
640-
641-
stack_msg =
642-
Enum.reduce(__STACKTRACE__, [], fn
643-
{mod, func, arity, [file: file, line: line]}, acc ->
644-
[
645-
"#{inspect(file)}:#{inspect(line)}: #{inspect(mod)}." <>
646-
"#{inspect(func)}/#{inspect(arity)}"
647-
| acc
648-
]
649-
end)
650-
|> Enum.reverse()
651-
|> Enum.join("\n")
640+
stack_msg = Exception.format_stacktrace( __STACKTRACE__ )
652641

653642
# assemble into a final message to output to the command line
654643
unless Mix.env() == :test do

0 commit comments

Comments
 (0)