[Gambas-user] gb.net.curl - error codes.

Benoît Minisini gambas at ...1...
Mon Jun 1 00:59:32 CEST 2009


> Hi am completing another project. To get weather information from the HK
> Observatory's web site.
>
> But I some times get error codes from the HTTP component.
>
> 1. Is there list of error codes that this component returns
> 2. Is there a method to reset the connection when I get an error?
>
> 	 As when I run the program with no internet I get and error code
> "-1006" when I connect to the internet I get the same error. The only
> way I have figured out was to restart the whole program.
>
> Details of program can be found here
>
>
> http://sjdsoft.hk/Linux/Software/HKWeather/index.html
>
> Any ideas?
>
>

Daniel implemented one constant for each error code in the gb.net.curl 
component, but not a function that would give you the text of the error.

I am aware of this common problem for a long time. This is the reason why in 
Gambas I usually prefer error strings against error numbers. 

But this is a different thing when you write a library in C or C++, so you 
often have these numerical codes in some components: they come from the 
underlying library, and so are easier to implement.

If you want a list of error codes, you can look in the source code. They are 
not documented at the moment, but I will do it soon.

Regards,

-- 
Benoît




More information about the User mailing list