Add an defined error ID (by number or tag) in exceptions.
Status: Beta
Brought to you by:
dcrowley
It would be very useful to add a ID-number in
exceptions when throwing them.
Something like :
#ifndef __EASYSOAP_ERROR_H__
#define __EASYSOAP_ERROR_H__
#define EASYSOAP_ERROR_UNREACHABLE -1
#define EASYSOAP_ERROR_SSLHANDSHAKEFAILURE -2
...
#endif
Usable when throwing exceptions :
throw SOAPException(EASYSOAP_ERROR_UNREACHABLE,"SOAP
Error : soap server unreachable");
or
throw SOAPException(EASYSOAP_ERROR_UNREACHABLE);
_ it will be easyer to identify errors.
_ it will help to use langage-based messages.
Right now (and if I didn't missed anything) it's very
hard to handle errors except saying "it failed".
In you easysoap directory : gunzip -c EasySoap++-SOAPEX.diff.gz | patch -p1
Logged In: YES
user_id=458777
I've made a patch to the CVS 2003-04-15 version to add that
feature.
_ The exceptions have a new int m_code member.
_ The exceptions have a new int Code() method.
_ The exceptions have two new constructors, basically the
same as the old ones, but starting with an "(int code,"
parameter.
_ A new file "SOAPExceptionsTag.h" holds the defines of the
exceptions codes as well as a few comments.
Expected problems :
_ Some codes could be redundant (the general exceptions moslty).
_ Some codes could be irrelevant for a library application
using EasySoap
I've not used yet the windows implementation code, but it's
modified (I'm using both Linux & Windows) and I guess it
should work.
I'm moslty using the socket/ssl exceptions codes.
unified patch attached, to be applied on the 2003-04-15 CVS
tree.