-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add a more descriptive error when spec load fails #5066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
raise LoadError.new <<~MSG.strip | ||
The test suite requires shared tooling to be installed. | ||
Please refer to spec/README.md for instructions. | ||
MSG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this change, I think it is helpful.
Can you please include the original exception message in the new exception message using a pattern like
rescue LoadError => exc
raise LoadError, "...: #{exc.class}: #{exc}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, since this is purely for development users in the console, I don't think it's useful to include the original error--it just makes it harder to read.
(If the original error was intelligible, I wouldn't have to make this PR :)
* Raise a friendlier load error when running specs so that outside contributors know what to do. * show original exception Co-authored-by: shields <shields@tablecheck.com> Co-authored-by: Dmitry Rybakov <dmitry.rybakov@mongodb.com> Co-authored-by: Oleg Pudeyev <code@olegp.name>
* Raise a friendlier load error when running specs so that outside contributors know what to do. * show original exception Co-authored-by: shields <shields@tablecheck.com> Co-authored-by: Dmitry Rybakov <dmitry.rybakov@mongodb.com> Co-authored-by: Oleg Pudeyev <code@olegp.name>
* master: Remove remaining encoding declarations (mongodb#5088) Add a more descriptive error when spec load fails (mongodb#5066) MONGOID-5191 Proper order for after_create callback (mongodb#5087) MONGOID-5189 Proper order of *_save callbacks (mongodb#5083) MONGOID-5098 Standardize/improve Range queries -- .where(field: 1..3) (mongodb#5025)
Raise a friendlier load error when running specs so that outside contributors know what to do.