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, and also contains the row number and column number where the error occurred in the 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 and the line number and column number at which the method detected the error. The HydraExpress exception hierarchy derives from rwsf::Exception, so the block catches RWxmsg as well as std::exception.

}



Previous fileTop of DocumentContentsIndex pageNext file

©2004-2007 Copyright Quovadx, Inc. All Rights Reserved.
Quovadx and Rogue Wave are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.