Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Forward original exception message when a require fails #4284

Closed
wants to merge 1 commit into from

Conversation

p
Copy link
Contributor

@p p commented Feb 7, 2016

When bundler failed to require a file it discarded the original message containing the reason why the require failed.

This change forwards the original message into the new message.

Example use case: jsonapi-resources referencing a nonexistent constant when loaded into a rails 5 project.

When bundler failed to require a file it discarded the original message containing the reason why the require failed.

This change forwards the original message into the new message.

Example use case: jsonapi-resources referencing a nonexistent constant when loaded into a rails 5 project.
@RochesterinNYC
Copy link
Contributor

Could you please add a spec/test covering this change?

@p
Copy link
Contributor Author

p commented Feb 10, 2016

I will look into that.

@segiddins
Copy link
Member

@p ping on this?

@p
Copy link
Contributor Author

p commented Feb 24, 2016

Have not had a chance to do it yet, sorry.

@RochesterinNYC
Copy link
Contributor

@p do you need any guidance on adding a spec for this change?

If it helps, you'd probably want to take a look at and add the test coverage here: https://github.com/bundler/bundler/blob/master/spec/runtime/require_spec.rb

@p
Copy link
Contributor Author

p commented Mar 12, 2016

That is helpful, thanks!

@RochesterinNYC
Copy link
Contributor

Has this been superseded by #4187 ?

@RochesterinNYC
Copy link
Contributor

Closing as the functionality in this PR has been fulfilled by #4187.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants