HydraExpress User Guide : PART II The HydraExpress Agent : Chapter 7 Error Handling
Chapter 7 Error Handling
Overview
HydraExpress distinguishes between exceptions from HydraExpress, SOAP faults and all other sources.
Exceptions
HydraExpress exceptions are signaled by throwing an rwsf::Exception or one of its derived classes, and include all non-SOAP exceptions, including XML parsing errors.
Other exceptions are any that do not derive from rwsf::Exception, for example std::exception, or RWxmsg if you are using SourcePro classes.
Faults in Web services are indicated by throwing either an instance of the generic rwsf::SoapFaultException deriving from rwsf::Exception, or an instance of a specially-generated class if the fault was defined in the WSDL file. SOAP faults are returned in SOAP messages.
In the WSDL-generated client and server sample implementations, HydraExpress catches SOAP faults in the invoke_<methodName>() service operation methods, whether the faults are generic or defined in the WSDL. All other exceptions are caught in main().
In the XML binding generated sample applications, the unmarshal methods catch an rwsf::XmlParseException deriving from rwsf::XmlException.