de.dante.extex.main.exception
Class MainException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byde.dante.util.exception.GeneralException
              extended byde.dante.extex.main.exception.MainException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
MainCodingException, MainConfigurationException, MainIOException, MainMissingArgumentException, MainOutputFileNotFoundException, MainUnknownOptionException

public class MainException
extends GeneralException

This is the base class for all exceptions of the main class. In addition to the message and cause attributes of the Exception it also carries an integer which is meant to be used as exit status for the main program.

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

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Constructor Summary
MainException(GeneralException cause)
          Creates a new object.
MainException(int theCode, java.lang.String theMessage)
          Creates a new object.
MainException(int theCode, java.lang.Throwable cause)
          Creates a new object.
 
Method Summary
 int getCode()
          Getter for the exit code
 java.lang.String getLocalizedMessage()
          Getter for the message.
 
Methods inherited from class de.dante.util.exception.GeneralException
getExitCode, getHelp, getLocalizer
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, 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
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
The constant serialVersionUID contains the id for serialization.

See Also:
Constant Field Values
Constructor Detail

MainException

public MainException(GeneralException cause)
Creates a new object.

Parameters:
cause - the cause for this Exception

MainException

public MainException(int theCode,
                     java.lang.String theMessage)
Creates a new object.

Parameters:
theCode - the exit code
theMessage - the message

MainException

public MainException(int theCode,
                     java.lang.Throwable cause)
Creates a new object.

Parameters:
theCode - the exit code
cause - the cause for this Exception
Method Detail

getCode

public int getCode()
Getter for the exit code

Returns:
the exit code

getLocalizedMessage

public java.lang.String getLocalizedMessage()
Getter for the message.

Returns:
the message