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

RequiredElementMissing is a subclass of Exception #48

Closed
lgustafson opened this issue Sep 18, 2012 · 1 comment
Closed

RequiredElementMissing is a subclass of Exception #48

lgustafson opened this issue Sep 18, 2012 · 1 comment

Comments

@lgustafson
Copy link

The custom exception class RequiredElementMissing is raised when a required xml accessor is missing during parsing. It is currently a subclass of Exception, meaning that you can't use "rescue => e" to rescue an exception. Instead you'd have to directly rescue it or use "rescue Exception => e". My take is that this behavior is too surprising. It might be a good idea to at least document the difference in the rdocs.

@Empact
Copy link
Owner

Empact commented Sep 18, 2012

I agree it should descend from StandardError or below, e.g. ArgumentError. If you make a pull request I'll happily include and release it.

parndt referenced this issue in parndt/representable May 13, 2013
Added syntax highlighting to Gemfile code.
@Empact Empact closed this as completed in #58 Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants