Description
Currently, if you have a xs:hexBinary element that doesn't contain xs:hexBinary in the infoset, we get an InvalidArgumentException:
java.lang.IllegalArgumentException: Hex character must be 0-9, a-z, or A-Z, but was 'X' at edu.illinois.ncsa.daffodil.util.Misc$.hexCharToValue$1(Misc.scala:278) at edu.illinois.ncsa.daffodil.util.Misc$.hex2Bytes(Misc.scala:292) at edu.illinois.ncsa.daffodil.dpath.NodeInfo$PrimType$HexBinary$.fromXMLString(NodeInfo.scala:526) at edu.illinois.ncsa.daffodil.processors.unparsers.InfosetCursorFromXMLReader.createElement(InfosetCursorFromXMLReader.scala:373) at edu.illinois.ncsa.daffodil.processors.unparsers.InfosetCursorFromXMLReader.handleStartElement(InfosetCursorFromXMLReader.scala:279) at edu.illinois.ncsa.daffodil.processors.unparsers.InfosetCursorFromXMLReader.reallyFill(InfosetCursorFromXMLReader.scala:232) at edu.illinois.ncsa.daffodil.processors.unparsers.InfosetCursorFromXMLReader.fill(InfosetCursorFromXMLReader.scala:222) at edu.illinois.ncsa.daffodil.util.CursorImplMixin$class.doAdvance(Cursor.scala:189) at edu.illinois.ncsa.daffodil.util.CursorImplMixin$class.inspect(Cursor.scala:178) ..
We need to fix this, and ensure that all other data formats have proper error handling to report which element in the infoset was invalid.
Attachments
Issue Links
- is duplicated by
-
DAFFODIL-2139 unparse of unsignedLong greater than signedLong maximum gives NumberFormatException
- Closed