com.pushtotest.tool
Class ToolException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.apache.commons.lang.exception.NestableException
              extended by com.pushtotest.tool.ToolException
All Implemented Interfaces:
java.io.Serializable, org.apache.commons.lang.exception.Nestable
Direct Known Subclasses:
ChainUnwindException, ConnectionTimeoutException, DatasourceException, NoSuchClassException, NotReadyException, UnsupportedTypeException

public class ToolException
extends org.apache.commons.lang.exception.NestableException

This is the base exception for everything in Tool so that there is an easy way to group all of the Tool Exceptions together.

See Also:
Serialized Form

Field Summary
protected static java.lang.String DEFAULT_ERROR
          Key for the default error message
 
Fields inherited from class org.apache.commons.lang.exception.NestableException
delegate
 
Constructor Summary
ToolException()
          Default constructor.
ToolException(java.lang.String message)
          Construct a new ToolException.
ToolException(java.lang.String message, java.lang.Throwable cause)
          Construct a new ToolException.
ToolException(java.lang.Throwable cause)
          Construct a new ToolException.
 
Method Summary
 java.lang.String getKey()
          Returns a key for a User viewable message.
 void setKey(java.lang.String key)
          Sets a key for a User viewable message.
 
Methods inherited from class org.apache.commons.lang.exception.NestableException
getCause, getMessage, getMessage, getMessages, getThrowable, getThrowableCount, getThrowables, indexOfThrowable, indexOfThrowable, printPartialStackTrace, 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

DEFAULT_ERROR

protected static java.lang.String DEFAULT_ERROR
Key for the default error message

Constructor Detail

ToolException

public ToolException()
Default constructor.


ToolException

public ToolException(java.lang.String message)
Construct a new ToolException.

Parameters:
message - The message to say what went wrong.

ToolException

public ToolException(java.lang.String message,
                     java.lang.Throwable cause)
Construct a new ToolException.

Parameters:
message - The message to say what went wrong.
cause - The exception that caused this to be thrown.

ToolException

public ToolException(java.lang.Throwable cause)
Construct a new ToolException.

Parameters:
cause - The exception that caused this to be thrown.
Method Detail

setKey

public void setKey(java.lang.String key)
Sets a key for a User viewable message. One that can be looked up in a properties file so it can be localized.

Parameters:
key - The key to look up in the proper locale file to show to the user.

getKey

public java.lang.String getKey()
Returns a key for a User viewable message. One that can be looked up in a properties file so it can be localized.

Returns:
A key to look up in the proper locale file to show to the user.