dmolesUC/xml-mapping_extensions

Errors thrown by NodeBase.extract_attr_value don't include the offending value

Opened this issue · 0 comments

Right now, e.g., passing an invalid date string to DateNode produces, e.g.:

invalid date
/dash2/apps/dash2-harvester/shared/bundle/ruby/2.2.0/gems/xml-mapping_extensions-0.3.4/lib/xml/mapping_extensions/date_node.rb:23:in `xmlschema'
/dash2/apps/dash2-harvester/shared/bundle/ruby/2.2.0/gems/xml-mapping_extensions-0.3.4/lib/xml/mapping_extensions/date_node.rb:23:in `to_value'
/apps/dash2/apps/dash2-harvester/shared/bundle/ruby/2.2.0/gems/xml-mapping_extensions-0.3.4/lib/xml/mapping_extensions/node_base.rb:27:in `extract_attr_value'
/dash2/apps/dash2-harvester/shared/bundle/ruby/2.2.0/gems/xml-mapping-0.10.0/lib/xml/mapping/base.rb:680:in `xml_to_obj'

This would be more useful with both the field name and the offending value.