Re: Current Exception



Adam Clauss <cabadam@xxxxxxxx> wrote:
> Could you create your own "global" variable (a static member of some class)
> and set it yourself when the catch the exception (it HAS to be caught
> somewhere...)
> Then in whatever code you are actually handling it, you can check that
> static member (and set it to null when done?)

That wouldn't help at the finally block level though, because (assuming
I'm understanding Chad right) the finally block is going to execute
before the catch block (as the catch block is higher up the call
stack).

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
.



Relevant Pages

  • Re: Cross-thread operation not valid
    ... > I get this Exception when I try to update some labels/textbox's from a ... Jon Skeet - ... If replying to the group, please do not mail me too ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: what is the difference wetween Int32.parse and Convert.ToInt32
    ... an exception. ... You should pick based on the semantics you ... Jon Skeet - ... If replying to the group, please do not mail me too ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: StreamReader.close and StreamWriter.close
    ... an Exception occurs? ... Either put a try/catch within the using statement, ... Jon Skeet - ... If replying to the group, please do not mail me too ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Newbie Question on Error Handling
    ... That wouldn't stop the current thread of executing. ... The ng response was that the exception was being ... Jon Skeet - ... If replying to the group, please do not mail me too ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: When is an event null?
    ... Geek wrote: ... have a look at this following code which handling the situation when ... Jon Skeet - ... If replying to the group, please do not mail me too ...
    (microsoft.public.dotnet.languages.csharp)

Loading