Re: Delegates and Exceptions

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

From: DT (dt_at_nospam.co.uk)
Date: 01/05/05


Date: Wed, 5 Jan 2005 19:05:08 -0000

I thought that because the callback executes on the main thread in my
example I could propagate the exception on that thread.

I guess my new question is how to detect exceptions in the threadpool?

Thanks again

"Jon Skeet [C# MVP]" <skeet@pobox.com> wrote in message
news:MPG.1c463908e9d65bf398bb9a@msnews.microsoft.com...
> AC <anonymous@discussions.microsoft.com> wrote:
>> Sorry I guess I'm being thick here. But that was what I
>> wanted to do in the first place. In the callback routine
>> I simple wanted to throw the exception so it gets
>> propagated up the call stack.
>>
>> Would it be possible to point me at a simple example?
>
> Which thread's stack are you expecting it to get propagated up?
>
> --
> Jon Skeet - <skeet@pobox.com>
> http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too



Relevant Pages

  • Re: N1298 - try/finally for C
    ... if you might encounter an exception within the scope of some ... which destructs objects automatically as the stack is unwound ... 5 and 7 then this saves having to include code to propagate the ... be simulated with nested setjmp calls, ...
    (comp.std.c)
  • Re: Delegates and Exceptions
    ... > I thought that because the callback executes on the main thread in my ... > example I could propagate the exception on that thread. ... No - the callback *doesn't* execute on the main thread. ...
    (microsoft.public.dotnet.general)
  • Re: Exceptions
    ... I cant say the same about the codemonkeys I work ... I'd rather let unexpected exceptions propagate to some outer ... I've suggested in the past that a package/suite should only ... What I'd like is to be able to propagate my exception ...
    (comp.lang.ada)
  • Re: Exceptions
    ... one declared exception can be raised in several subprograms, but I think the average number of subprograms that can raise a given application-defined exception is between 1 and 2, not larger, in this application. ... The number of subprograms that can *propagate* a given application-defined exception is larger, but I can't say by how much. ... Several handlers for Constraint_Error "translate" C_E to a more specific exception by raising the specific application-defined exception for handling at higher levels. ...
    (comp.lang.ada)
  • Re: Enumerate question: Inner looping like in Perl
    ... the 'for' statement does not propagate the StopIteration ... That's what the 'else' clause in a 'for' statement is for: ... return or by propagating an exception). ... purpose from "Python in a Nutshell", ...
    (comp.lang.python)