de.dante.util.exception
Class GeneralException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byde.dante.util.exception.GeneralException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BackendException, CatcodeException, InterpreterException, MainException, NotObservableException, PanicException, ScannerException

public class GeneralException
extends java.lang.Exception

This is a base class for exceptions which carry an additional helping text and a return code.

Exception-related rules

Version:
$Revision: 1.4 $
Author:
Gerd Neugebauer
See Also:
Serialized Form

Constructor Summary
GeneralException()
          Creates a new object with the default exit code of -1.
GeneralException(int code)
          Creates a new object.
GeneralException(java.lang.String message)
          Creates a new object with the default exit code of -1.
GeneralException(java.lang.String message, java.lang.Throwable cause)
          Creates a new object with the default exit code of -1.
GeneralException(java.lang.Throwable cause)
          Creates a new object with the default exit code of -1.
 
Method Summary
 int getExitCode()
          Getter for the exit code.
 java.lang.String getHelp()
          Getter for further help information.
protected  Localizer getLocalizer()
          Getter for localizer.
 
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

GeneralException

public GeneralException()
Creates a new object with the default exit code of -1.


GeneralException

public GeneralException(int code)
Creates a new object.

Parameters:
code - the exit code

GeneralException

public GeneralException(java.lang.String message)
Creates a new object with the default exit code of -1.

Parameters:
message - the message

GeneralException

public GeneralException(java.lang.String message,
                        java.lang.Throwable cause)
Creates a new object with the default exit code of -1.

Parameters:
message - the message
cause - the cause for a chained exception

GeneralException

public GeneralException(java.lang.Throwable cause)
Creates a new object with the default exit code of -1.

Parameters:
cause - the cause for a chained exception
Method Detail

getExitCode

public int getExitCode()
Getter for the exit code.

Returns:
the exit code

getHelp

public java.lang.String getHelp()
Getter for further help information.

Returns:
the help information

getLocalizer

protected Localizer getLocalizer()
Getter for localizer.

Returns:
the localizer.