Re: Undestanding Exception Processing

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Answer 1: Following is the flow trace when an exception hasn't been
serviced in its original try/catch block and continue at the next catch
block.

i. Finally of original try/catch
(Optional) Finally of other try/catch blocks (up the stack) where
exception was not serviced
ii. Catch block where exception was serviced.
iii. Finally of the catch where exception was serviced.

Answer 2: Try/catch can not be looped unless you use labels (see: goto
statement). I personally think that it is not a good idea to loop a
try/catch. because if a statement fails once, it'll always fail to pass
try/catch.

I don't have much Idea about your third question.
HTH. Cheers :)

Maqsood Ahmed [MCP,C#]
Kolachi Advanced Technologies
http://www.kolachi.net

*** Sent via Developersdex http://www.developersdex.com ***
.



Relevant Pages

  • try/catch block design. Two approaches, which ones best?!
    ... I have a question on try/catch design: ... I can either put a try/catch block in every function and have each one ... (creating an error stack) ... information available to me locally where the exception actually occured. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: RFD: How To Recognize Bad Javascript Code
    ... error in the contents of one script element does not interfere with the successful interpretation/compilation of syntax error free code in other script elements within the same document. ... So any residual compatibility issue is really just in relation to very old web browsers; mostly the forth generation of browsers and their antecedents. ... javascript's try/catch construct is nearly totally useless for various reasons. ... In Java (and other languages with good exception handling support) you can be very specific about which exceptions you catch and handle. ...
    (comp.lang.javascript)
  • Re: Re: kern/99979: Get Ready for Kernel Module in C++
    ... in a jmpbuf -which are restored after a longjmp(). ... try/catch stores less. ... the instruction pointer and stack pointer, ... They are called "exception" ...
    (freebsd-hackers)
  • Re: Error handlers and Exception handlers
    ... There have been many a thread of the benefits of Try/Catch verses On Error, ... Otherwise I let my global exception handlers handle the event. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Updating a DB via SQL is giving me a headache
    ... problem will never be executed using the Try/Catch block, ... Connection was certainly created and opened, ... If so, null is not an Integer, and that could throw an exception. ... is handled, execution continues. ...
    (microsoft.public.dotnet.framework.aspnet)