org.iges.anagram
Class ModuleException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.iges.util.ChainedException
                    |
                    +--org.iges.anagram.AnagramException
                          |
                          +--org.iges.anagram.ModuleException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ConfigException

public class ModuleException
extends AnagramException

Thrown when a module cannot complete the task it is attempting.

See Also:
Serialized Form

Field Summary
protected  java.lang.String clientMessage
           
protected  Module module
           
 
Constructor Summary
ModuleException(Module module, java.lang.String message)
          Creates a ModuleException associated with the given module, with the given message.
ModuleException(Module module, java.lang.String clientMessage, java.lang.String message)
          Creates a ModuleException associated with the given module, with the given message, plus a different message that should be returned to the client.
ModuleException(Module module, java.lang.String message, java.lang.Throwable cause)
          Creates a ModuleException associated with the given module, with the given message and cause.
 
Method Summary
 java.lang.String getClientMessage()
          Returns the client message, if any.
 Module getModule()
          Returns the module that generated this exception
 
Methods inherited from class org.iges.util.ChainedException
getCause, getMessage, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

clientMessage

protected java.lang.String clientMessage

module

protected Module module
Constructor Detail

ModuleException

public ModuleException(Module module,
                       java.lang.String message)
Creates a ModuleException associated with the given module, with the given message.


ModuleException

public ModuleException(Module module,
                       java.lang.String message,
                       java.lang.Throwable cause)
Creates a ModuleException associated with the given module, with the given message and cause.


ModuleException

public ModuleException(Module module,
                       java.lang.String clientMessage,
                       java.lang.String message)
Creates a ModuleException associated with the given module, with the given message, plus a different message that should be returned to the client. This can be used to avoid revealing sensitive information to the client, or to provide a detailed message for the client while including a shorter one in the log file.

Method Detail

getModule

public Module getModule()
Returns the module that generated this exception


getClientMessage

public java.lang.String getClientMessage()
Returns the client message, if any.