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 7998033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:06:58+00:00 2026-06-04T15:06:58+00:00

So our application has a nice, central exception handler, wherein the details of exceptions

  • 0

So our application has a nice, central exception handler, wherein the details of exceptions are logged, generic windows are displayed to the users, and shutdown happens in a nice graceful way. However, we now have a 3rd party component that, from time to time, (and potentially for perfectly valid reasons) calls Environment.FailFast. This blows our app out of the water, and looks quite terrible to our users. Is there some way to handle Environment.FailFast in an elegant way?

  • 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-04T15:07:00+00:00Added an answer on June 4, 2026 at 3:07 pm

    I can’t see a way, according to the various entries in MSDN this is a hard termination of the process. Any code you would create to handle this would reside in the process. It also doesn’t run finally blocks or any pending finalizers, so I’m guessing wouldn’t provide any events or hooks in order to allow custom code to run. In a way this makes sense, otherwise it might not fail “fast” and it argues to only use in cases of extreme process corruption.

    http://msdn.microsoft.com/en-us/library/dd289241

    I see two three options:

    1. Send a request to the vendor to change the code and remove this call.
    2. Find a new vendor.
    3. As suggested by @RB. farm the use of this DLL into a new process so the core application process remains safe. I did this once, mega headache but “it worked”. I would only advise this if you cannot utilise suggestions 1 or 2!

    Quote from MSDN:

    This method terminates a process without running any active
    try/finally blocks or finalizers.

    The FailFast method writes the message string to the Windows
    Application event log, creates a dump of your application, and then
    terminates the current process. The message string is also included in
    error reporting to Microsoft.

    Use the FailFast method instead of the Exit method to terminate your
    application if the state of your application is damaged beyond repair,
    and executing your application’s try/finally blocks and finalizers
    will corrupt program resources.

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

Sidebar

Related Questions

I have a Windows application. The windows application has our XML Library on it.
Our application has a service layer and a DAO layer, written as Spring beans.
Our application has many controls that are created dynamically. For example, a navigation pane
Our application has a couple of shell scripts that are called from web-based Oracle
Our Java application has a number of modules which implement a common interface. By
I'm currently going through the process of running FxCop through our application that has
In our application through the process of developing a lot of JAR files has
Our large application (VB.Net, Framework 3.5) has been developed more or less from the
My company has a ClickOnce application that has been in use with our customers
Recently our WPF/Entity Framework 4.0 application has become unstable after we began using backgroundworkers

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.