Re: Capture unhandled exception

From: Michael J. Salamone [eMVP] (mikesa#at#entrek#dot#com)
Date: 04/29/04


Date: Thu, 29 Apr 2004 06:13:52 -0700

That's right.

You can write a JIT debugger that gets registered with the system. When a
second chance exception occurs, it gets invoked with the process id of the
process that caused the exception.

This works fine for CE 4.0 and higher I believe. CE 3.0 and earlier worked
sort of - the JIT debugger was invoked on *first* chance exceptions, so
wasn't a very practical solution.

-- 
Michael Salamone [eMVP]
Entrek Software, Inc.
www.entrek.com
"Rodger Higgins" <rhiggins@earthling.net> wrote in message
news:%23Y5HjjeLEHA.3712@TK2MSFTNGP10.phx.gbl...
> Sorry, probably should have gave more information.  I would like to
> implement a system wide monitor that captures any unhandled exceptions
> and performs error recovery.  This would need to capture exceptions
> irregardless of where they occurred.  My assumption was the
> __try/__except only work in the context of a particular program, correct?
>
> Michael J. Salamone [eMVP] wrote:
>
> > __try/__except?  Or, a debugger program (either PB IDE debugger or roll
your
> > own).  Of course, either method can actually handle the exception,
making it
> > not unhandled ;)


Relevant Pages

  • Re: UnhandledException in Windows Service
    ... event and the OnStart and OnStop service events in Try/Catch blocks ... handler for unhandled exceptions useful/needed in a Windows Service? ... > Asynchronous & catch the exception there, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: CLR error on program startup
    ... > I suggest you place a debugger in the problem machine, then register it as ... unhandled exception and from that it was obvious what the problem was. ... Always have a try/catch block within Main so that no exceptions can be thrown ... If an exception is thrown out of Main AND you don't have a JIT debugger ...
    (microsoft.public.dotnet.framework.clr)
  • Re: Thread Abort and Unhandled Exception Event
    ... In .NET 2.0 unhandled exceptions in separate threads cause raising ... unhandled exception event and terminating the process. ... throwOnError, Boolean ignoreCase) ...
    (microsoft.public.dotnet.framework)
  • RE: PrintPreviewDialog and Win32Exception "The RPC server is unava
    ... The ThreadExceptionEventArgs will really only give me the exception type ... Using ThreadException is not acceptable. ... method in order to ensure routing all unhandled exceptions to the ... ThreadException handler. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • RE: Policy level User cannot be saved
    ... You may try to follow the steps below to see if the problem persists. ... In the "When the exception is thrown" section, ... Regarding First chance exception, take a look at: ... This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.dotnet.languages.vb)