Skip to content

Commit 350b87e

Browse files
authored
Merge pull request #111 from noozo/RemoveStacktraceDeprecations
RemoveStacktraceDeprecations
2 parents e1f2f1b + b4f13dc commit 350b87e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/bypass/plug.ex

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ defmodule Bypass.Plug do
2222
conn
2323
catch
2424
class, reason ->
25-
stacktrace = System.stacktrace()
25+
stacktrace = unquote do
26+
if Version.match?(System.version(), ">= 1.7.0") do
27+
quote do: __STACKTRACE__
28+
else
29+
quote do: System.stacktrace()
30+
end
31+
end
2632
put_result(pid, route, ref, {:exit, {class, reason, stacktrace}})
2733
:erlang.raise(class, reason, stacktrace)
2834
end

0 commit comments

Comments
 (0)