File tree Expand file tree Collapse file tree 2 files changed +3
-22
lines changed
Expand file tree Collapse file tree 2 files changed +3
-22
lines changed Original file line number Diff line number Diff line change @@ -1743,26 +1743,7 @@ defmodule Kernel do
17431743
17441744 message ->
17451745 quote do
1746- stacktrace = unquote ( stacktrace )
1747-
1748- case unquote ( message ) do
1749- message when is_binary ( message ) ->
1750- :erlang . raise ( :error , RuntimeError . exception ( message ) , stacktrace )
1751-
1752- atom when is_atom ( atom ) ->
1753- :erlang . raise ( :error , atom . exception ( [ ] ) , stacktrace )
1754-
1755- % _ { __exception__: true } = other ->
1756- :erlang . raise ( :error , other , stacktrace )
1757-
1758- other ->
1759- message = <<
1760- "reraise/2 expects a module name, string or exception" ,
1761- "as the first argument, got: #{ inspect ( other ) } "
1762- >>
1763-
1764- :erlang . error ( ArgumentError . exception ( message ) )
1765- end
1746+ :erlang . raise ( :error , Kernel.Utils . raise ( unquote ( message ) ) , unquote ( stacktrace ) )
17661747 end
17671748 end
17681749 end
Original file line number Diff line number Diff line change @@ -135,8 +135,8 @@ defmodule Kernel.Utils do
135135
136136 def raise ( other ) do
137137 ArgumentError . exception (
138- "raise/1 expects a module name, string or exception as " <>
139- "the first argument, got: #{ inspect ( other ) } "
138+ "raise/1 and reraise/2 expect a module name, string or exception " <>
139+ "as the first argument, got: #{ inspect ( other ) } "
140140 )
141141 end
142142
You can’t perform that action at this time.
0 commit comments