Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7971203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:34:52+00:00 2026-06-04T07:34:52+00:00

If my application ends up with an exception I can’t handle I want it

  • 0

If my application ends up with an exception I can’t handle I want it to show an error message to the user and quit. The problem is that the user is shown an exception dialog with the options Details, Continue, and Quit and if the user clicks Continue the application stays alive in “some” state which I don’t want.

To replicate that with with the least amount of code I just created a Windows Forms application, added a button, and for the button click code just wrote:

throw new ApplicationException("I must crash now!!!");

When starting the compiled exe from the Debug folder, the Release folder, or starting the exe from the Release folder copied somewhere else (in case the pdb file is causing the problem) and clicking on the button I’m shown the Details / Continue / Quit dialog and if I say continue the application stays alive. How can I prevent the continue option from appearing?

I have this behaviour on my computer (Vista, Visual Studio 2008, Visual Studio 2010, creating the test application with VS2010) and also on a user computer (Windows 7).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:34:53+00:00Added an answer on June 4, 2026 at 7:34 am

    It is Windows Forms that catches the exception and displays the dialog box you want to avoid. You can configure Windows Forms to not do this by using the Application.SetUnhandledExceptionMode method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how can i run code when an application ends with asp.net mvc ?
When my process ends, I get output to stderr that looks like: Exception exceptions.TypeError:
I have been tasked with building an application where an end user can have
I need my application does not cause an exception and ends when the smartphone
Lets say in an application you have an entity called User. Each User can
Application : HTA (therefore IE) This is an application that uses SendKeys to populate
Application works fine. I can access everything in debug except for an Array Adapter
I created an application using seam-gen. The created operation to search the DB ends
I've an application which does Process.Start() to start another application 'ABC'. I want to
I am getting confused between domain/application logic and User Interface logic. To illustrate what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.