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

  • Home
  • SEARCH
  • 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 304215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:15:35+00:00 2026-05-12T07:15:35+00:00

Does .NET has an Exception that similar to Delphi’s EAbort ? Currently, I define

  • 0

Does .NET has an Exception that similar to Delphi’s EAbort ?

Currently, I define my own “AbortProcess” inheriting Exception.
Together with My.Application.UnhandledException handler that ignoring “AbortProcess”
I’m still wondering if similar mechanic in .NET is already exists.

Class AbortProcess
    Inherits System.Exception
End Class

Sub Abort()
    Throw New AbortProcess()
End Sub

Sub AppDomain_UnhandledException(ByVal sender As Object, ByVal e As ApplicationServices.UnhandledExceptionEventArgs)
    If TypeOf e.Exception Is AbortProcess Then
        e.ExitApplication = False
    End If
End Sub    

Sub PerformActions()
    Action1()
    If Not Action2() Then
        Abort()
    End If
    Action3()
    ...
End Sub

How does typical .NET developer handle this use case ?

UPDATED:

For some reasons a number of people down vote this question, unfortunately, without giving any comment. The only reason I can figure out is that they might believe Exception should never be used to control program flow; and I tend to agree with that. However, I recently study ANTLR and find that they indeed use custom Exception (RecognitionException) as control flow construct. Together with Python’s StopIteration usage, I believe that using Exception as control flow construct is actually already being used broadly. It’s just not being standardize like in Delphi VCL.

  • 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-05-12T07:15:35+00:00Added an answer on May 12, 2026 at 7:15 am

    There are two qualities that define Delphi’s EAbort exception class.

    1. The IDE comes pre-configured to not interrupt your program when it detects an exception of that class being raised.
    2. The main application exception handler recognizes EAbort and its descendants and does not display the usual message box when it catches such an exception.

    It looks like the code you’ve proposed accomplishes the second part. You can configure Visual Studio for the first part; refer to the answer to another Stack Overflow question, Is there a better way to get Visual Studio to ignore try/catch in debug mode? I’m not aware of any exception class already designated for that.

    The EAbort exception is meant to make the program stop running whatever event or message handler it’s running and resume at the main message loop. In order for that to really work, though, all your other code needs to be written to handle exceptions properly. That is, they need to use finally sections to keep themselves in stable and consistent states, and they need to either rethrow or never catch exceptions that they aren’t really capable of fixing.

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

Sidebar

Ask A Question

Stats

  • Questions 143k
  • Answers 143k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It's possible that data is nil, in which case [data… May 12, 2026 at 8:26 am
  • Editorial Team
    Editorial Team added an answer If you cannot use BITS because you want to be… May 12, 2026 at 8:26 am
  • Editorial Team
    Editorial Team added an answer You need to either convert each table individually: ALTER TABLE… May 12, 2026 at 8:26 am

Related Questions

I have a method which constructs an object, calls an Execute method, and frees
Does anyone have any suggestions for a best practice or preferred way of rolling
Is there any built in support in jQuery for basic assertion checking, primarily of
I have a .NET Setup Project to which I've added a custom installer action.
Given: Constructing an ADO Connection object from one thread and giving it to another

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.