axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sahan Gamage" <sah...@gmail.com>
Subject Re: Axis2c, 0.94, error processing
Date Sat, 14 Oct 2006 21:10:57 GMT
Hi,

If the code is exact as it is, I think you're setting the error to the
"error" object and try to retrieve it from the "env->error" object.
Since "error" and "env->error" are two objects you won't see the error
set to one object reflected in the other.

HTH
-sahan

On 10/14/06, Krankurs Leonid <lkrankur@ford.com> wrote:
>
> Hi,
>
> Could you please clarify Axis2c, 0.94 error processing behavior in the
> following scenario:
>
>
> axis2_allocator_t* allocator = axis2_allocator_init (NULL);
> axis2_error_t* error = axis2_error_create(allocator);
> axis2_env_t* env = axis2_env_create_with_error(allocator, error);
>
> axis2_char_t* t = NULL;
> axis2_char_t* url_str[3] =
> {
>         "",
>         "123",
>         "http:",
> };
>
>
> for ( int i = 0; i < 3; ++i )
> {
>         if ( NULL == url[i] )
>         {
>                 AXIS2_ERROR_SET_ERROR_NUMBER(error, AXIS2_ERROR_INVALID_NULL_PARAM);
>                 AXIS2_ERROR_SET_STATUS_CODE(error, (axis2_status_codes_t)AXIS2_FAILURE);
>         }
>         else
>         {
>                 AXIS2_ERROR_SET_STATUS_CODE(error, (axis2_status_codes_t)AXIS2_SUCCESS);
>         }
>
>         if ( AXIS2_SUCCESS != AXIS2_ERROR_GET_STATUS_CODE(error) )
>         {
>                  t = (axis2_char_t*)AXIS2_ERROR_GET_MESSAGE(env->error);
>                  t = (axis2_char_t*) env->error->ops->get_extended_message(env->error);
>         }
> }
>
>
> in the case of AXIS2_SUCCESS != AXIS2_ERROR_GET_STATUS_CODE(error)
>
> both calls
>         AXIS2_ERROR_GET_MESSAGE(env->error)
>         env->error->ops->get_extended_message(env->error)
> return NULL
>
> what is wrong?
>
>
> Thank you,
> Leonid
>
> --
> View this message in context: http://www.nabble.com/Axis2c%2C-0.94%2C-error-processing-tf2443488.html#a6812858
> Sent from the Axis - C++ - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message