Project

General

Profile

« Previous | Next » 

Revision 89eba507

Added by deivid (David Rodríguez) 8 months ago

[rubygems/rubygems] Only raise DSLError during Gemfile parsing when it's actually useful

DSLError prints the specific line in a Gemfile where the error was
raised. That's helpful when the error was explicitly raised by the
Gemfile DSL or, in the case it's implicitly raised, when the offending
code lives right in the Gemfile.

If it's an internal error, or something buried dowm in user code called
from the Gemfile, DSLError is not helpful since it hides the actual
culprit.

This commit tries to only raise DSLError in the cases mentioned above
and otherwise let the original error be raised.

https://github.com/rubygems/rubygems/commit/b30ff5a682