Kaushalye Kapuruge wrote:
Senaka Fernando wrote:
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

+1,
That's even better.

HANDLE makes sense because, both LOG and SET, and most probably any future
FOO and BAR would rather be related to handling an error. Therefore, we
can add a AXIS2_HANDLE_ERROR().

This method will accept four parameters in an attempt to keep the profile
low, having in mind the possibility of extending this in the future.

1. env (out of which log and error can be obtained)
2. error_number (ex:- AXIS2_ERROR_MULTIPLE_CODE_ELEMENTS_ENCOUNTERED)
3. status_code
4. AXIS2_LOG_SI

BTW, is AXIS2_LOG_SI required? Can't this be embedded in the macro?

Also, I will create a JIRA Issue on this.
Thanks. For the time being we'll stick to the earlier approach where we use ERROR_SET and then LOG.

It is OK to keep the existing code as it is, and fix it when we get some time. However, IMHO, it would help to add the proposed unified macro now, so any new functions written can utilize that.

Thanks,
Samisa...

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to