Class TerminateToolException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
opennlp.tools.cmdline.TerminateToolException
- All Implemented Interfaces:
Serializable
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 System.exit(int).
The return code convention is to return:
0 in case of graceful termination
-1 in case of runtime errors, such as IOException
1 in case of invalid parameters.
Note: Do not use this class, internal use only!
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTerminateToolException(int code) TerminateToolException(int code, String message) TerminateToolException(int code, String message, Throwable t) -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
TerminateToolException
-
TerminateToolException
-
TerminateToolException
public TerminateToolException(int code)
-
-
Method Details
-
getCode
public int getCode() -
getMessage
- Overrides:
getMessagein classThrowable
-