Kernel.reraise
You're seeing just the macro
reraise
, go back to Kernel module for more information.
Raises an exception preserving a previous stacktrace.
Works like raise/1
but does not generate a new stacktrace.
Note that __STACKTRACE__
can be used inside catch/rescue
to retrieve the current stacktrace.
Examples
try do
raise "oops"
rescue
exception ->
reraise exception, __STACKTRACE__
end
Raises an exception preserving a previous stacktrace.
reraise/3
works like reraise/2
, except it passes arguments to the
exception/1
function as explained in raise/2
.
Examples
try do
raise "oops"
rescue
exception ->
reraise WrapperError, [exception: exception], __STACKTRACE__
end