org.foray.core
Class FOrayException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.foray.core.FOrayException
All Implemented Interfaces:
Serializable

public class FOrayException
extends Exception

Exception thrown when FOray has a problem.

See Also:
Serialized Form

Constructor Summary
FOrayException(String message)
          Create a new instance with a message.
FOrayException(String message, String contextMessage)
          Create a new instance with a message and a context message.
FOrayException(String message, Throwable thrown)
          Create a new instance wrapping another thrown item and providing a message.
FOrayException(String message, Throwable thrown, String contextMessage)
          Create a new instance wrapping another thrown item and providing a message and a context message.
FOrayException(Throwable thrown)
          Create a new instance wrapping another thrown item.
FOrayException(Throwable thrown, String contextMessage)
          Create a new instance wrapping another thrown item and providing a context message.
 
Method Summary
 String getMessage()
           
 boolean isContextSet()
          Indicates whether a context message exists for this exception.
 void setContextMessage(String contextMessage)
          Sets the context message for this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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

FOrayException

public FOrayException(String message)
Create a new instance with a message.

Parameters:
message - A message describing the nature of the exception.

FOrayException

public FOrayException(String message,
                      String contextMessage)
Create a new instance with a message and a context message.

Parameters:
message - A message describing the nature of the exception.
contextMessage - A message containing the location of the thrown exception.

FOrayException

public FOrayException(Throwable thrown)
Create a new instance wrapping another thrown item.

Parameters:
thrown - The thrown item to be wrapped.

FOrayException

public FOrayException(Throwable thrown,
                      String contextMessage)
Create a new instance wrapping another thrown item and providing a context message.

Parameters:
thrown - The thrown item to be wrapped.
contextMessage - A message containing the location of the thrown exception.

FOrayException

public FOrayException(String message,
                      Throwable thrown)
Create a new instance wrapping another thrown item and providing a message.

Parameters:
thrown - The thrown item to be wrapped.
message - A message describing the nature of the exception.

FOrayException

public FOrayException(String message,
                      Throwable thrown,
                      String contextMessage)
Create a new instance wrapping another thrown item and providing a message and a context message.

Parameters:
thrown - The thrown item to be wrapped.
message - A message describing the nature of the exception.
contextMessage - A message containing the location of the thrown exception.
Method Detail

setContextMessage

public void setContextMessage(String contextMessage)
Sets the context message for this exception.

Parameters:
contextMessage - The new context message for this exception.

isContextSet

public boolean isContextSet()
Indicates whether a context message exists for this exception.

Returns:
True iff this exception has a context message.

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable


Copyright © 2017. All rights reserved.