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

Improve error message when referencing undefined metadata elements #58

Open
akhtars opened this issue Oct 22, 2014 · 0 comments
Open

Improve error message when referencing undefined metadata elements #58

akhtars opened this issue Oct 22, 2014 · 0 comments

Comments

@akhtars
Copy link

akhtars commented Oct 22, 2014

If I attempt to set the value of a metadata element that hasn't been defined in the terminology, such as fancybook.name.give_name = "Zoia" (note typo) instead of fancybook.name.given_name = "Zoia", (example from this lesson), I get this error message:

NoMethodError: undefined method `sanitize_new_values' for nil:NilClass
    from /home/shaun/.rvm/gems/ruby-2.0.0-p576/gems/om-3.1.0/lib/om/xml/dynamic_node.rb:76:in `val='
    from /home/shaun/.rvm/gems/ruby-2.0.0-p576/gems/om-3.1.0/lib/om/xml/dynamic_node.rb:64:in `new_update_node'
    from /home/shaun/.rvm/gems/ruby-2.0.0-p576/gems/om-3.1.0/lib/om/xml/dynamic_node.rb:43:in `method_missing'

It would be helpful to provide a message indicating that the error is due to not finding the referenced element in the terminology.

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

1 participant