Class TerminateToolException

Namespace
NOpenNLP.Tools.Formats
Assembly
NOpenNLP.Tools.dll

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:

  • 0 in case of graceful termination
  • -1 in case of runtime errors, such as IO errors
  • 1 in case of invalid parameters

Note: Do not use this class, internal use only!
public class TerminateToolException : Exception, ISerializable
Inheritance
TerminateToolException
Implements
Inherited Members

Constructors

TerminateToolException(int)

public TerminateToolException(int code)

Parameters

code int

TerminateToolException(int, string?)

public TerminateToolException(int code, string? message)

Parameters

code int
message string

TerminateToolException(int, string?, Exception?)

public TerminateToolException(int code, string? message, Exception? t)

Parameters

code int
message string
t Exception

Properties

Code

The code the process should terminate with.

public int Code { get; }

Property Value

int