Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress XML Binding Development Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

8.4 Data Binding Parsing Errors

The data binding runtime may throw an exception while unmarshaling a document. If the document is not well-formed or the document structure is invalid, the unmarshal function throws an rwsf::XmlParseException. The parse error contains a string that describes the error in the XML document. HydraExpress propagates any other exceptions thrown. In particular, note that although HydraExpress does not explicitly validate content while unmarshaling a document, the data type classes that HydraExpress uses may throw exceptions when provided with invalid input. Here are the guidelines for exception handling:

The code sample below shows a try-catch block that contains a call to unmarshal. The XML parsing error exception contains a descriptive message. The HydraExpress exception hierarchy derives from rwsf::Exception, so the block catches this exception as well.



Previous fileTop of DocumentContentsIndex pageNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.