473,396 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

UnhandledExceptionEventHandler

I've set up the UnhandledExceptionEventHandler delegate in a console
application (Main()) to handle any exceptions that bubble up from the stack
and are not handled explicitly by other try/catch blocks. The delegate
method logs the exceptions and treats them as unrecoverable, since they are
not known at design time, and exits the application. The problem I have is
that even in the release version of the application, the JIT debugger dialog
will show before passing the exception to the delegated handler, even when
running the Release code outside of the VS.Net environment.

I've read some articles on registry hacks to disable JIT debugger to get
around this, but I've chosen not to go that route. Instead, I've adopted
the Main() -> SubMain() method, wrapping the SubMain() call in a try/catch
block in Main() to process any escaped exceptions. I like the idea of using
a delegate method, but it just doesn't appear to work as expected.

So, my question is this... Is this the designed behavior of the
UnhandledExceptionEventHandler? If so, what is the purpose of using this
method if the user is prompted with a cryptic JIT debug notice (or worse,
the server process hangs with the dialog window)? If it's not intended
behavior, will we see it corrected in VS 2005?

Any insight would be greatly appreciated.

Thanks,
- Glen
Nov 16 '05 #1
0 1894

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ryan Seghers | last post by:
I've got a program that has no user interface (like a service but not actually a Windows Service yet) in which I'd like to handle OutOfMemoryExceptions. I'd at least like to log the failure before...
7
by: Mike Strieder | last post by:
i want to catch all execeptions with my own handler, but the problem is, that the JIT-Debugger always start! i put also the <system.windows.forms jitDebugging="false" /> in the machine.config ...
0
by: Manfred Braun | last post by:
Hi All, in a windows service application , I add an eventhandler to the Application Domain: public static void Main() { System.ServiceProcess.ServiceBase.Run(new SimpleServiceDemo1());;...
2
by: Steph | last post by:
I am working on a Windows Forms App. I have attached a standard UnhandledExceptionEventHandler to the current domain to catch unexpected errors. In my application, when I trigger an unhandled...
7
by: DraguVaso | last post by:
Hi, In my application, on some given actions while debugging in Visual Studio, I suddenly get a "System.ComponentModel.Win32Exception was unhandled" Message="Error creating window handle."...
0
by: Peter Bromberg [C# MVP] | last post by:
Recently another developer I work with and I were discussing ways to log more information than just the stock event log entry when an app blows up because of an unhandled exception. There were a...
8
by: Michael Bray | last post by:
I'm writing a library to provide plugin capability to my applications. It does this by loading DLL's into a new AppDomain for each plugin that is loaded. Now obviously when I write a plugin, I...
2
by: tchu | last post by:
I found that in VB.Net, My.Application.UnhandledException can cancel the exception handling by setting the ExitApplication property of UnhandledExceptionEventArgs parameter to false. Can the same...
1
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi misters, is it possible use AppDomain.Currentdomain. UnhandledException event en ASP.NET 2.0 ?? I have this code: protected override void OnInit(EventArgs e) { base.OnInit(e);
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.