Re: [twsocket] Exception handling in a Form

2007-01-26 Thread Wilfried Mestdagh
Hello Veit, Connect as whell as other methods can raise exceptions in case of failure. This because there has to be something prepare to connect in this case. Then the real connection happens in background and you dont have to worry for exceptions. If there are they are internally handled. If

Re: [twsocket] Exception handling in a Form

2007-01-26 Thread Arno Garrels
Ahh, thanks :) BTW: Do you know the greatest hooking library available? If not, take a look add MadCodeHook it's for Delphi, BCB as well as C. GREAT COMPONENT from the autor of Madexcept. Arno Wilfried Mestdagh wrote: Hello Veit, Connect as whell as other methods can raise exceptions in

[twsocket] Exception handling in a Form

2007-01-25 Thread Veit Zimmermann
Hi May be I'm missing something, but... How can I catch an exception raised by an asynchronous function like TnCnx.Connect in a form. In a TApplication there is a Method for this (HandleException). Is there something similar for a TForm? TIA Veit -- To unsubscribe or change your

Re: [twsocket] Exception handling in a Form

2007-01-25 Thread Wilfried Mestdagh
Hello Veit, Normally the components handles their own exception by design (as it should be). Be sure you have no exceptions in events. If there is a chance that your code can raise an exception then you should have that event into an try excpet block and handle it. --- Rgds, Wilfried [TeamICS]

Re: [twsocket] Exception handling in a Form

2007-01-25 Thread Arno Garrels
You probably hit the wrong button. Your mail is addressed to me privately. Arno Wilfried Mestdagh wrote: Hello Veit, Normally the components handles their own exception by design (as it should be). Be sure you have no exceptions in events. If there is a chance that your code can raise an

Re: [twsocket] Exception handling in a Form

2007-01-25 Thread Arno Garrels
Arno Garrels wrote: You probably hit the wrong button. Your mail is addressed to me privately. Perfect chaos, sorry. Please ignore this mail. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html Arno Wilfried Mestdagh wrote: Hello Veit, Normally the

Re: [twsocket] Exception handling in a Form

2007-01-25 Thread Wilfried Mestdagh
Hello Arno, Perfect chaos, sorry. Please ignore this mail. That's because we are programmers :) However there is one thing. Hitting 'reply to all' does address the mail also to the original poster. I dont like it as it start often private mailings. And 'reply to all' is a common used button in

Re: [twsocket] Exception handling in a Form

2007-01-25 Thread Veit Zimmermann
Hello Wilfried Thanks for your reply. The answer is a surprise for me: Of course I know try except/finally, but why does it work when I wrap it around TnCnx.Connect? I thought this is an asynchronous method? But it works. I would have expected that the try/except block is left right after calling