TerminateToolException (Apache OpenNLP :: API 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.cmdline, class: TerminateToolException

Package opennlp.tools.cmdline

# Class TerminateToolException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
opennlp.tools.cmdline.TerminateToolException

All Implemented Interfaces:
  `Serializable`

@Internal public class TerminateToolException extends RuntimeException
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:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TerminateToolException(int code)`
  `TerminateToolException(int code, String message)`
  `TerminateToolException(int code, String message, Throwable t)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getCode()`
  `String`
  `getMessage()`

  ### Methods inherited from class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### TerminateToolException

    public TerminateToolException(int code, String message, Throwable t)

  - ### TerminateToolException

    public TerminateToolException(int code, String message)

  - ### TerminateToolException

    public TerminateToolException(int code)

- ## Method Details

  - ### getCode

    public int getCode()

  - ### getMessage

    public String getMessage()
    Overrides:
      `getMessage` in class `Throwable`