![]() |
| | #1 |
| Registered User Join Date: May 2006
Posts: 1,579
| default exception handling For the default approach for a console application or Windows service written in C#, if there is an uncaught exception, the console application or the Windows service will terminate? Right? thanks in advance, George |
| George2 is offline |
| | #2 |
| Confused Join Date: Sep 2001 Location: Sweden
Posts: 3,125
| Does for me... It's not a that hard scenario to test
__________________ MagosX.com Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. |
| Magos is offline |
| | #3 |
| Registered User Join Date: May 2006
Posts: 1,579
| |
| George2 is offline |
| | #4 |
| Registered User Join Date: Apr 2008 Location: USA
Posts: 22
| Exceptional... Code:
Try()
{
}
Catch()
{
}
Finally()
{
}
If nothing is explicitly designed within the catch definition to handle a given exception then the application will step into the 'finally()' member for last minute instructions before terminating the application in question. This is where you will explicitly call methods to save work in progress and dispose of external service providers like browsers and notepads that your system called up during runtime. |
| TheRaven is offline |
| | #5 | |
| Registered User Join Date: May 2006
Posts: 1,579
| Thanks TheRaven, I am interested, but seems never used before the below trick you mentioned, especially -- "an if -- else or switch case within the catch method member". Could you show some pseudo code please? So that I can learn from you. Quote:
regards, George | |
| George2 is offline |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| signal handling and exception handling | lehe | C++ Programming | 2 | 06-15-2009 10:01 PM |
| Exception handling in a large project | EVOEx | C++ Programming | 7 | 01-25-2009 07:33 AM |
| exception handling | coletek | C++ Programming | 2 | 01-12-2009 05:28 PM |
| is such exception handling approach good? | George2 | C++ Programming | 8 | 12-27-2007 08:54 AM |
| Signal and exception handling | nts | C++ Programming | 23 | 11-15-2007 02:36 PM |