Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add a helpful message when an error class passed to `and_raise` requires 1 or more initialization arguments #99

Closed
dchelimsky opened this Issue · 2 comments

2 participants

@dchelimsky
Owner

The and_raise method accepts either a class or an instance, but it only works with a class if the class has a zero-arg initializer.. Right now, when it receives a class with a non-zero-arg initializer the ArgumentError bubbles up, and is confusing for the end user.

and_raise should capture an ArgumentError and raise its own ArgumentError with helpful information as to how to fix the problem.

@coreyhaines

Hey, look, I'm pull request number 100!
#100

Always one to grab the spotlight!

@coreyhaines

Since my error message writing skills aren't always the best, I'm sure you'll want to adjust it to make it include more "helpful information as to how to fix the problem."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.