org.freeshell.zs.common
Class TerminatingException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.freeshell.zs.common.TerminatingException
All Implemented Interfaces:
java.io.Serializable

public class TerminatingException
extends java.lang.RuntimeException

Represent a runtime exception that terminates the program. This exception should be allowed to propagate to the top-level for proper handling.

See Also:
Serialized Form

Constructor Summary
TerminatingException(java.lang.String message)
          Constructor.
TerminatingException(java.lang.String message, java.lang.Throwable cause, int exitCode)
          Constructor.
 
Method Summary
 int getExitCode()
          Return the exit status code to be reported to the OS.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TerminatingException

public TerminatingException(java.lang.String message,
                            java.lang.Throwable cause,
                            int exitCode)
Constructor.

Parameters:
message - Exception message; saved for later retrieval by the Throwable.getMessage() method
cause - Cause of the exception; saved for later retrieval by the Throwable.getCause() method
exitCode - Exit status code; saved for later retrieval by the TerminatingException.getExitCode() method

TerminatingException

public TerminatingException(java.lang.String message)
Constructor. Exit status code is assumed to be 1.

Parameters:
message - Exception message; saved for later retrieval by the Throwable.getMessage() method
Method Detail

getExitCode

public int getExitCode()
Return the exit status code to be reported to the OS.

Returns:
exit status code