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

7.2 Handling Exceptions

This section provides specifics on the types of exceptions that can occur in HydraExpress and guidelines for how to handle them.

7.2.1 rwsf::Exception and its Derived Classes

Exceptions of rwsf::Exception or its derived classes fall in the following general categories:

It is generally preferable to catch the most specific exception possible, so that you can handle the exception gracefully and not mask other errors.

7.2.2 Other Possible Exceptions

Depending on the data mappings used in your application, exceptions other than rwsf::Exception may be thrown. For example, for services generated with default mappings and with the -STL option, message text is returned for exceptions derived from std::exception and rwsf::Exception, so you should be prepared to catch these exceptions. For -sourcepro generated services, message text is returned not only for std::exception and rwsf::Exception but also for RWxmsg, so there will be three types of exceptions your application will want to handle.

If you are using any custom datamapping via the -datamap option when generating code, you may have other exceptions that should be caught. For more information on this option, see Section 8.7, "Creating Customized Mappings," in the HydraExpress XML Binding Development Guide.



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.