Commit 777bcb767c23f6a98d1b184c0b41b1fe7f79aa13

Thomas de Grivel 2022-02-03T12:24:37

stacktrace formatting

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/stack.ex b/lib/stack.ex
index f75604f..abcfdfa 100644
--- a/lib/stack.ex
+++ b/lib/stack.ex
@@ -4,7 +4,7 @@ defmodule Stack do
 
   def to_string([], acc), do: acc |> Enum.reverse() |> Enum.join("\n")
   def to_string([{module, fun, arity, [file: file, line: line]} | rest], acc) do
-    str = "#{module}.#{fun}/#{arity} in #{file}:#{line}"
+    str = "#{module}.#{fun}/#{arity}\n    #{file}:#{line}"
     to_string(rest, [str | acc])
   end
   def to_string([{module, fun, arity, _} | rest], acc) do