Walter Boss
Walter Boss

Reputation: 173

Exception Error Dialog

I wanted to know why on some computers when an unhandled exception occurs in .NET (C# or VB.NET application) why it shows different dialogs.

Eg, on some computers it shows similar to this:

first example dialog

While on the others, it shows like this:

second example dialog

I wanted to show it like on the second (Unhandled exception has occurred in your application) one in all systems that use my application for some specific purposes.

Please don't suggest to use global exception handler method.

Upvotes: 1

Views: 2145

Answers (2)

nzic
nzic

Reputation: 184

Well, what you marked as correct behavior can be controlled by enabling and disabling JIT (Just in time debuger).

Maybe this can help you out, or just set you on the right track: MSDN: How to: Enable/Disable Just-In-Time Debugging

I am not suggesting anything but the practice is that the end user should never get this kind of exception especially with a stack trace.

Upvotes: 2

armen.shimoon
armen.shimoon

Reputation: 6401

Some applications have JIT debugging enabled:

http://msdn.microsoft.com/en-us/library/5hs4b7a6.aspx

Specifically, in a .NET app.config you can add:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

Upvotes: 1

Related Questions