Title: Exit Current Process and Write an Error to the Event Log Without Processing Try-Catch-Finally Code Blocks
Shortcut: failfast
Description: The System.Environment.FailFast method ends the current
process without running any code inside of any try-catch-finally blocks or Finalizer methods and writes an optional error message to the Event Log. Calling
FailFast will result in the current aplication exiting in a brute manner. Use FailFast only in situations where executing any additional code in the application is
unwanted. The only code that is permitted to execute after a FailFast call is the finalizer of an instantiated class that inherets from the
CriticalFinalizerObject class.
Author: C# .Net Fun - http://www.dotnetfun.com - Michael G.
Declarations:
Literal: ID:
Type:
ToolTip:
Default:
Object: ID: strErrorMessage
Type: System.String
ToolTip: The error message to write to the application event log when FailFast is called.
Default: "Test Error!"
Code View: