You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Samisa Abeysinghe <sa...@gmail.com> on 2005/09/29 07:17:07 UTC

[Axis2] Guththila needs to define a set of error returns

At the moment, it guththila returns -1 on all errors, however we may 
need more comprehensive error returns to be more specific on the kind of 
error.
Axis Axis2C we havee:
https://svn.apache.org/repos/asf/webservices/axis2/trunk/c/include/axis2c_errno.h

Well, we difne our error number space relative to APR as we use APR, but 
guththila may need not do that.

Thanks,
Samisa...

Re: [Axis2] Guththila needs to define a set of error returns

Posted by Damitha Kumarage <da...@gmail.com>.
Samisa Abeysinghe wrote:

> Sanjiva Weerawarana wrote:
>
>> On Thu, 2005-09-29 at 16:04 +0600, Dinesh Premalal wrote:
>>  
>>
>>> Guththila throws  Xml_PullParser_Exception  ()  on errors  that  code
>>> is 
>>> PRIVATE int XML_PullParser_Exception (char *file, int line)
>>> {
>>>  printf ("Throws XML_PullParser_Exception \t %s \t %d \n", file, line);
>>>  exit (0);
>>> }
>>> Which says file and line number when an error occured. I think that is
>>> enough for identify the error that throwed exception. This
>>> Xml_PullParser_Exception function defined in xmlpullparser.c file.
>>> Please have a look on it.   
>>
>>
>> As a util library, under *NO* condition should Guththila ever call
>> exit()! Let's agree on an error no convention and use that instead.
>> Also, we need to set up a log mechanism (did log4c ship yet? maybe APR
>> has logging capabilities).
>>  
>>
I looked into log4c which has bsd style licence. But did not 
incorporated yet into axis2 until we have a look into apache code to see 
how they do it.

damitha

> I looked into APR and could not find log mechanisms in the API. I want 
> to look into apache code to double check how they are doing it.
> Samisa...
>
>> Sanjiva.
>>
>>
>>
>>
>>  
>>
>
>


Re: [Axis2] Guththila needs to define a set of error returns

Posted by Samisa Abeysinghe <sa...@gmail.com>.
Sanjiva Weerawarana wrote:

>On Thu, 2005-09-29 at 16:04 +0600, Dinesh Premalal wrote:
>  
>
>>Guththila throws  Xml_PullParser_Exception  ()  on errors  that  code
>>is  
>>
>>PRIVATE int 
>>XML_PullParser_Exception (char *file, int line)
>>{
>>  printf ("Throws XML_PullParser_Exception \t %s \t %d \n", file, line);
>>  exit (0);
>>}
>>Which says file and line number when an error occured. I think that is
>>enough for identify the error that throwed exception. This
>>Xml_PullParser_Exception function defined in xmlpullparser.c file.
>>Please have a look on it. 
>>    
>>
>
>As a util library, under *NO* condition should Guththila ever call
>exit()! Let's agree on an error no convention and use that instead.
>Also, we need to set up a log mechanism (did log4c ship yet? maybe APR
>has logging capabilities).
>  
>
I looked into APR and could not find log mechanisms in the API. I want 
to look into apache code to double check how they are doing it.
Samisa...

>Sanjiva.
>
>
>
>
>  
>


Re: [Axis2] Guththila needs to define a set of error returns

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Thu, 2005-09-29 at 16:04 +0600, Dinesh Premalal wrote:
> 
> Guththila throws  Xml_PullParser_Exception  ()  on errors  that  code
> is  
> 
> PRIVATE int 
> XML_PullParser_Exception (char *file, int line)
> {
>   printf ("Throws XML_PullParser_Exception \t %s \t %d \n", file, line);
>   exit (0);
> }
> Which says file and line number when an error occured. I think that is
> enough for identify the error that throwed exception. This
> Xml_PullParser_Exception function defined in xmlpullparser.c file.
> Please have a look on it. 

As a util library, under *NO* condition should Guththila ever call
exit()! Let's agree on an error no convention and use that instead.
Also, we need to set up a log mechanism (did log4c ship yet? maybe APR
has logging capabilities).

Sanjiva.




Re: [Axis2] Guththila needs to define a set of error returns

Posted by Dinesh Premalal <xy...@gmail.com>.
Hi,
On 9/29/05, Samisa Abeysinghe <sa...@gmail.com> wrote:
>
> At the moment, it guththila returns -1 on all errors,


Guththila throws Xml_PullParser_Exception () on errors that code is

PRIVATE int
XML_PullParser_Exception (char *file, int line)
{
  printf ("Throws XML_PullParser_Exception \t %s \t %d \n", file, line);
  exit (0);
}

Which says file and line number when an error occured. I think that is
enough for identify the error that throwed exception. This
Xml_PullParser_Exception function defined in xmlpullparser.c file. Please
have a look on it.

thanks,
Dinesh

however we may
> need more comprehensive error returns to be more specific on the kind of
> error.
> Axis Axis2C we havee:
>
> https://svn.apache.org/repos/asf/webservices/axis2/trunk/c/include/axis2c_errno.h
>
> Well, we difne our error number space relative to APR as we use APR,

but
> guththila may need not do that.
>
> Thanks,
> Samisa...






--
W.Dinesh Premalal
premalwd@cse.mrt.ac.lk
http://www.cse.mrt.ac.lk/~premalwd/