Class TerminateToolException
Exception to terminate the execution of a command line tool.
The exception should be thrown to indicate that the VM should be terminated with
the specified error code, instead of just calling Environment.Exit somewhere
in the code.
The return code convention is the following:
0in case of graceful termination-1in case of runtime errors, such as IO errors1in case of invalid parameters
public class TerminateToolException : Exception, ISerializable
- Inheritance
-
TerminateToolException
- Implements
- Inherited Members
Constructors
TerminateToolException(int)
public TerminateToolException(int code)
Parameters
codeint
TerminateToolException(int, string?)
public TerminateToolException(int code, string? message)
Parameters
TerminateToolException(int, string?, Exception?)
public TerminateToolException(int code, string? message, Exception? t)
Parameters
Properties
Code
The code the process should terminate with.
public int Code { get; }