[fpc-devel] Avoid exception if FPHTTPClient cannot connect to server?
Werner Pamler
werner.pamler at freenet.de
Mon Jul 31 15:10:26 CEST 2017
Agreed. This is the same situation as with string-to-number conversion:
StrToFloat fires an exception if the string is not a valid float, but
there's also a "TryStrToFloat" which by-passes the exception and just
returns a false in case of an error. Why not having something like a
"TryGet" which returns true only if the file is successfully downloaded
and false in all other cases (HTTP error, or no connection)?
More information about the fpc-devel
mailing list