org.cdlib.xtf.util
Class GeneralException

Object
  extended by Throwable
      extended by Exception
          extended by RuntimeException
              extended by GeneralException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CQLParseException, DynaXMLException, QueryGenException, QueryRequestParser.QueryFormatError, QueryRouteException, RedirectException

public class GeneralException
extends RuntimeException

A general-purpose exception used for problems that may occasionally happen and are expected to. When one of these is thrown, the errorGen stylesheet only receives a callstack if isSevere() returns true.

See Also:
Serialized Form

Field Summary
 AttribList attribs
          Attributes that give more info on the exception
 
Constructor Summary
GeneralException(String message)
          Default constructor.
GeneralException(String message, Throwable cause)
          Constructor that includes a reference to the exception that caused this one.
 
Method Summary
 boolean isSevere()
          Tells whether this is a really bad problem.
 void set(String attribName, String attribValue)
          Sets an attribute for further information on the exception.
 
Methods inherited from class Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

attribs

public AttribList attribs
Attributes that give more info on the exception

Constructor Detail

GeneralException

public GeneralException(String message)
Default constructor.

Parameters:
message - Description of what happened

GeneralException

public GeneralException(String message,
                        Throwable cause)
Constructor that includes a reference to the exception that caused this one.

Parameters:
message - Description of what happened
cause - The exception that caused this one.
Method Detail

set

public void set(String attribName,
                String attribValue)
Sets an attribute for further information on the exception.


isSevere

public boolean isSevere()
Tells whether this is a really bad problem. Derived classes should override if it's not. If this method returns true, a call stack is passed to the errorGen stylesheet.