Senaka Fernando wrote:
Hi all,
How about AXIS2_ERROR_SET_AND_LOG(env->error, ...) a new macro which
combines the AXIS2_ERROR_SET() and AXIS2_LOG_ERROR().
What if we wanted to do more with this macro in the future? e.g.
AXIS2_ERROR_SET_AND_LOG_AND_FOO_AND_BAR(env->error, ...) ?
So why not AXIS2_HANDLE_ERROR(env->error, ...) or something like that.
Where HANDLE ==> SET_AND_LOG_AND_FOO_AND_BAR
Samisa...
Thoughts?
Regards,
Senaka
Hi,
When we do AXIS2_ERROR_SET, we have to log an error message as well. In
"some" situations we can use the same error message we set to the
env->error for logging. Like this
AXIS2_ERROR_SET(env->error,
AXIS2_ERROR_MULTIPLE_CODE_ELEMENTS_ENCOUNTERED,
AXIS2_FAILURE);
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
AXIS2_ERROR_GET_MESSAGE(env->error));
instead of
AXIS2_ERROR_SET(env->error,
AXIS2_ERROR_MULTIPLE_CODE_ELEMENTS_ENCOUNTERED,
AXIS2_FAILURE);
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
"Multiple fault code elements encountered in SOAP
fault");
If the message is detailed enough for logging I do not see any problem
of doing this. Do you?
Cheers,
Kaushalye
--
http://blog.kaushalye.org/
http://wso2.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Samisa Abeysinghe
Software Architect; WSO2 Inc.
http://www.wso2.com/ - "Oxygenating the Web Service Platform."
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]