Hi Mark,

I'm very sorry about the situation. Yes it was my fault. I tested this
only with Windows (and it is working fine in Windows) because my Linux
platform is down :-( 

I looked in to this again and I noticed that the constructor of
AxisGenException used in the faulty line was as follows:

AxisGenException(const int iExceptionCode, char* pcMessage = NULL)

NOTE: pcMessage was not a const char*

Would that be the problem here?? I found this mistake in several classes
that I have modified. I fixed it to be const char*. Could somebody
please test this and let us know the progress???

Regards,
Dushshantha

-----Original Message-----
From: Mark Whitlock [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 05, 2005 10:03 PM
To: [email protected]
Subject: Dushshantha: Exception model





Hi Dushshantha,
The fix you put in for the exception model does not build for us on AIX
and
Linux, but I don't understand why. It fails on lines such as...

throw AxisGenException(e.getExceptionCode(),
const_cast<char*>(e.what()));

which is line 218 of ClientAxisEngine.cpp. It fails with this error....

ClientAxisEngine.cpp, line 218.23: 1540-1213 (S) The temporary for the
throw expression is of type "axiscpp::AxisGenException" and cannot be
initialized with an expression of type "axiscpp::AxisGenException"

On Linux I get this error out of the same code.....

ClientAxisEngine.cpp: In member function `virtual int
axiscpp::ClientAxisEngine::process(axiscpp::SOAPTransport*)':
ClientAxisEngine.cpp:218: no matching function for call to
`axiscpp::AxisGenException::AxisGenException(axiscpp::AxisGenException)'
AxisGenException.h:45: candidates are:
axiscpp::AxisGenException::AxisGenException(axiscpp::AxisGenException&)

There are lots of other places where this same compile error occurs. I
guess the problem is that it can't implicitly cast a AxisGenException to
a
AxisGenException&. But I don't really understand why not. However I have
discovered that I can make it compile by changing it to the
following.....

AxisGenException age(e.getExceptionCode(), const_cast<char*>(e.what()));
throw age;

I'm not sure whether this is a good fix. I guess a better fix would be
to
put the proper constructors on AxisGenException (and others). Do you
know
why it can't cast a temporary to a reference? If you can fix this
properly,
please go ahead,
Thanks,
Mark
Mark Whitlock
IBM

Reply via email to