We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
rescue => error re_raise_as(SomeExceptionClass, error) # and custom message (may be) end
def re_raise_as(exception_klass, error) # and custom message (may be) exception = exception_klass.new(error.message) exception.set_backtrace(error.backtrace) raise(exception) end