Skip to content

[new-feature] Exception re-raising #6

Description

@0exp
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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions