Thread View: borland.public.cppbuilder.internet.socket
2 messages
2 total messages
Started by Jan Slansk
Mon, 13 Jun 2005 15:42
Exception handling
Author: Jan Slansk
Date: Mon, 13 Jun 2005 15:42
Date: Mon, 13 Jun 2005 15:42
20 lines
1374 bytes
1374 bytes
Hi,
I am unable to catch exceptions throwed by indy's IdHTTP component (for
example EIdSocketError or EIdHTTPProtocolException throwed when
connection is forbidden).
try {
IdHTTP1->Post("address",str1,str2);
--DoSomething1--
}
catch(...) {
--DoSomething2--
}
--DoSomething3--
After Post throws exception nothing from --DoSomethingX-- appears so it
looks that Exception is throwed but uncatched.
I'am using Borland C++ builder 6 and INDY 9.
Thanks a lot for ideas.
Re: Exception handling
Author: Bob Gonder
Date: Mon, 13 Jun 2005 16:40
Date: Mon, 13 Jun 2005 16:40
33 lines
1683 bytes
1683 bytes
Jan Slansk wrote:
>I am unable to catch exceptions throwed by indy's IdHTTP component (for
>example EIdSocketError or EIdHTTPProtocolException throwed when
>connection is forbidden).
>
>try {
> IdHTTP1->Post("address",str1,str2);
> --DoSomething1--
>}
>
>catch(...) {
> --DoSomething2--
>}
> --DoSomething3--
>
>After Post throws exception nothing from --DoSomethingX-- appears so it
>looks that Exception is throwed but uncatched.
>I'am using Borland C++ builder 6 and INDY 9.
>Thanks a lot for ideas.
Remy seems to be missing this morning...so, from an earlier post of
his:
Change that to this instead:
catch( const EIdException &e )
Or:
catch( const Exception &e )
Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads