Skip to content

Consider using Exception#detailed_message in our custom errors #8067

@deivid-rodriguez

Description

@deivid-rodriguez

Sometimes our custom errors wrap an underlying error and try to show the wrapped error and backtrace. See for example https://github.com/rubygems/rubygems/blob/c63c4b0305de7a5712436d37decca648b14b0091/bundler/lib/bundler/errors.rb#L134-L148.

@segiddins suggested that we may be able to use Exception#detailed_message to show the cause instead. I noticed that it's only available in newer rubies, but we could gradually move to that if it simplifies things. I also noticed there's Exception#full_message that includes the backtrace.

We should evaluate whether this makes sense for us and will simplify our errors, or whether we should not bother.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions