Does .NET has an Exception that similar to Delphi's EAbort ?
Currently, 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 ?