| Dart Home | PowerTCP Sockets for .NET | Custom Development | Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums |
| Author | Forum: PowerTCP Sockets for .NET (Secure and Standard) Topic: Dialog box on uncaught exception |
| mikeskells From: London, United Kingdom Posts: 12 Member Since: 04/01/04 |
posted April 1, 2004 8:09 AM Is there any way to disable this dialog. I am writing components that will be used as services and daemons, and the UI would not be appropriate. It would be ideal if there was an event that could be fired to handle this occurance, so that the error could be logged appropriately |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted April 1, 2004 9:26 AM Why don't you just put a Try ... Catch around all your event code? |
| mikeskells From: London, United Kingdom Posts: 12 Member Since: 04/01/04 |
posted April 1, 2004 10:26 AM I was aware that I could do that. I was hoping that the tool could be used in an unattend manner. the use of the UI implies that the designers expected this to be used only in environments where there is a user available. Is the tool appropriate for unattended operation? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted April 1, 2004 10:49 AM Yes, it's appropriate for unattended operation. Maybe I am misunderstanding something. What does having a UI have to do with putting Try ... Catches in the event code? |
| mikeskells From: London, United Kingdom Posts: 12 Member Since: 04/01/04 |
posted April 1, 2004 4:51 PM The 2 points are unrelated. In an unattended operation there is no user to press the buttons. I was hoping that there was a mechanism to allow the events of the system to be managed in an unattended manner. I am not sure that will happen to the dialog box when the system is used as a service, and there is no screen to display them on, at best I will loose threads I think as they hang waiting for the dialog to be confirmed General good practice for exception handling is to only to catch the exceptions that you can handle. There are some events that the system produces whic are truely unexpected, and unpredictable to be the event handing charactistics of .NET. I dont believe thy the library is handling the exception in unattended operation by displaying the dialog. There is a large amount of event code and I was hoping to aviod changes to the structure and behavior of the code to avoid a facility that I didnt want ot have in the first place! I will file a suggestion that there is an ability to define a static event handler to cover this situation |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted April 1, 2004 5:04 PM If you put try ... catch around the code, the exception will not be unhandled and there will not be a dialog box. We can (and may) remove the dialog box in the future, but you will still have to put try .. catch around the event code. You cannot have unhandled exceptions inside the events for our components. I am not sure of the exact reasons, I believe it is explained in the Online Help. |
| mikeskells From: London, United Kingdom Posts: 12 Member Since: 04/01/04 |
posted April 1, 2004 5:13 PM the only reference that I can se is the comment about the messagebox at the end of 'Using EndXXX Events' I cannot find an explaination of the reason. Can you give me a pointer please |
| Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|