Skip to content
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

Custom ArgumentError messages for Dash #98

Closed
bgetting opened this issue May 30, 2013 · 4 comments
Closed

Custom ArgumentError messages for Dash #98

bgetting opened this issue May 30, 2013 · 4 comments

Comments

@bgetting
Copy link

It would be nice to provide custom errors messages so that:

ArgumentError: The property 'req_attr' is required for this Dash.

could be made into something like:

ArgumentError: The property 'req_attr" is required for the credentials hash.

Seems like it could be done as simple as:

class Credentials < Hashie::Dash
  property :req_attr, :required =>  true, :message => "is required for the credentials hash"
end

or something like that. Just an idea...

@jch
Copy link
Contributor

jch commented May 31, 2013

👍 Cool idea. I don't remember the Dash code off the top of my head. Want to dive in and try to build a pull request?

@bgetting
Copy link
Author

I'll see about it when I have time. Once I get through this current project I'll see about digging into the code.

On May 31, 2013, at 9:50 AM, Jerry Cheung notifications@github.com wrote:

Cool idea. I don't remember the Dash code off the top of my head. Want to dive in and try to build a pull request?


Reply to this email directly or view it on GitHub.

@dblock
Copy link
Member

dblock commented Mar 31, 2014

Bump.

@pbalaban
Copy link
Contributor

pbalaban commented Oct 7, 2014

See PR #232.

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

No branches or pull requests

5 participants