Keel 2.1RC2

org.keel.services.persist
Class PersistenceException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.keel.core.exception.NestedException
              extended byorg.keel.services.persist.PersistenceException
All Implemented Interfaces:
java.io.Serializable

public class PersistenceException
extends NestedException

Used to report a problem at the persistence level

Author:
Michael Nash
See Also:
Serialized Form

Field Summary
private  java.util.Map errorMap
           
 
Fields inherited from class org.keel.core.exception.NestedException
 
Fields inherited from class java.lang.Exception
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
PersistenceException()
          Default constructor
PersistenceException(java.lang.String s)
          Constructor with a single message, no key
PersistenceException(java.lang.String s, java.util.Map m)
          Constructor with a single message, no key
PersistenceException(java.lang.String s, java.lang.String newErrorKey)
          String message and error key
PersistenceException(java.lang.String message, java.lang.Throwable newNested)
          Constructor with a message and a nested exception
PersistenceException(java.lang.String message, java.lang.Throwable newNested, java.util.Map m)
          Constructor with a message and a nested exception
PersistenceException(java.lang.String message, java.lang.Throwable newNested, java.lang.String newErrorKey)
          Constructor with a single message and a nested exception with error key
PersistenceException(java.lang.String message, java.lang.Throwable newNested, java.lang.String newErrorKey, java.util.Map m)
           
PersistenceException(java.lang.Throwable newNested)
          Constructor with no message and a nested exception
PersistenceException(java.lang.Throwable newNested, java.util.Map m)
           
PersistenceException(java.lang.Throwable newNested, java.lang.String newErrorKey)
          Constructor with no message and a nested exception, but with an error key
PersistenceException(java.lang.Throwable newNested, java.lang.String newErrorKey, java.util.Map m)
           
 
Method Summary
 void addErrors(java.util.Map m)
          Add a Map of errors as detail errors for this overall exception
 java.util.Map getErrors()
           
 void printStackTrace(java.io.PrintStream p)
          Extend printStackTrace to handle the nested Error Map
 void printStackTrace(java.io.PrintWriter p)
          Extend printStackTrace to handle the nested Error Map
 
Methods inherited from class org.keel.core.exception.NestedException
addToMessage, addToStack, getErrorKey, getMessage, getNestedExceptionType, getStackTraceAsString, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

errorMap

private java.util.Map errorMap
Constructor Detail

PersistenceException

public PersistenceException()
Default constructor


PersistenceException

public PersistenceException(java.lang.String s)
Constructor with a single message, no key

Parameters:
s - exception message

PersistenceException

public PersistenceException(java.lang.String s,
                            java.util.Map m)
Constructor with a single message, no key

Parameters:
s - exception message

PersistenceException

public PersistenceException(java.lang.String s,
                            java.lang.String newErrorKey)
String message and error key


PersistenceException

public PersistenceException(java.lang.String message,
                            java.lang.Throwable newNested)
Constructor with a message and a nested exception

Parameters:
newNested - The nested item

PersistenceException

public PersistenceException(java.lang.String message,
                            java.lang.Throwable newNested,
                            java.util.Map m)
Constructor with a message and a nested exception

Parameters:
newNested - The nested item

PersistenceException

public PersistenceException(java.lang.String message,
                            java.lang.Throwable newNested,
                            java.lang.String newErrorKey)
Constructor with a single message and a nested exception with error key

Parameters:
newNested - The nested item

PersistenceException

public PersistenceException(java.lang.String message,
                            java.lang.Throwable newNested,
                            java.lang.String newErrorKey,
                            java.util.Map m)

PersistenceException

public PersistenceException(java.lang.Throwable newNested)
Constructor with no message and a nested exception

Parameters:
newNested - The nested exception

PersistenceException

public PersistenceException(java.lang.Throwable newNested,
                            java.util.Map m)

PersistenceException

public PersistenceException(java.lang.Throwable newNested,
                            java.lang.String newErrorKey)
Constructor with no message and a nested exception, but with an error key

Parameters:
newNested - The nested exception

PersistenceException

public PersistenceException(java.lang.Throwable newNested,
                            java.lang.String newErrorKey,
                            java.util.Map m)
Method Detail

addErrors

public void addErrors(java.util.Map m)
Add a Map of errors as detail errors for this overall exception


getErrors

public java.util.Map getErrors()

printStackTrace

public void printStackTrace(java.io.PrintStream p)
Extend printStackTrace to handle the nested Error Map

Overrides:
printStackTrace in class NestedException
Parameters:
p - The PrintStream to write the exception messages into

printStackTrace

public void printStackTrace(java.io.PrintWriter p)
Extend printStackTrace to handle the nested Error Map

Overrides:
printStackTrace in class NestedException
Parameters:
p - The PrintWriter to write the exception messages into

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.