com.jenkov.mrpersister.scope
Class ScopeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.jenkov.mrpersister.scope.ScopeException
All Implemented Interfaces:
java.io.Serializable

public class ScopeException
extends java.lang.RuntimeException

Exceptions of this type are thrown from either connection or transaction scopes, if an exception is thrown inside the scope. The exception thrown inside the scope is wrapped in a ScopeException and rethrown, once the scope object has closed the connection correctly and/or committed/rolled back the transaction.

Author:
Jakob Jenkov - Copyright 2005 Jenkov Development
See Also:
Serialized Form

Field Summary
protected  java.lang.Throwable closeException
           
protected  java.lang.Throwable commitException
           
protected  java.lang.Throwable rollbackException
           
protected  java.lang.Throwable setAutoCommitFalseException
           
 
Constructor Summary
ScopeException()
           
ScopeException(java.lang.String message)
           
ScopeException(java.lang.String message, java.lang.Throwable cause)
           
ScopeException(java.lang.String message, java.lang.Throwable cause, java.lang.Throwable commitException, java.lang.Throwable rollbackException, java.lang.Throwable setAutoCommitFalseException, java.lang.Throwable closeException)
           
ScopeException(java.lang.Throwable cause)
           
ScopeException(java.lang.Throwable cause, java.lang.Throwable commitException, java.lang.Throwable rollbackException, java.lang.Throwable setAutoCommitFalseException, java.lang.Throwable closeException)
           
 
Method Summary
 java.lang.Throwable getCause()
          Returns the root cause of this ScopeException.
 java.lang.Throwable getCloseException()
          Returns the exception thrown when closing the connection.
 java.lang.Throwable getCommitException()
          Returns the exception thrown when committing the transaction.
 java.lang.Throwable getRollbackException()
          Returns the exception thrown when rolling back the transaction.
 java.lang.Throwable getSetAutoCommitFalseException()
          Returns the exception thrown when calling setAutoCommit(false) on the connection.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

closeException

protected java.lang.Throwable closeException

commitException

protected java.lang.Throwable commitException

rollbackException

protected java.lang.Throwable rollbackException

setAutoCommitFalseException

protected java.lang.Throwable setAutoCommitFalseException
Constructor Detail

ScopeException

public ScopeException()

ScopeException

public ScopeException(java.lang.String message)

ScopeException

public ScopeException(java.lang.Throwable cause)

ScopeException

public ScopeException(java.lang.String message,
                      java.lang.Throwable cause)

ScopeException

public ScopeException(java.lang.Throwable cause,
                      java.lang.Throwable commitException,
                      java.lang.Throwable rollbackException,
                      java.lang.Throwable setAutoCommitFalseException,
                      java.lang.Throwable closeException)

ScopeException

public ScopeException(java.lang.String message,
                      java.lang.Throwable cause,
                      java.lang.Throwable commitException,
                      java.lang.Throwable rollbackException,
                      java.lang.Throwable setAutoCommitFalseException,
                      java.lang.Throwable closeException)
Method Detail

getCause

public java.lang.Throwable getCause()
Returns the root cause of this ScopeException.

Overrides:
getCause in class java.lang.Throwable
Returns:

getCloseException

public java.lang.Throwable getCloseException()
Returns the exception thrown when closing the connection. If no exception was thrown when closing the connection, null is returned.

Returns:
The exception thrown when closing the connection, or null.

getCommitException

public java.lang.Throwable getCommitException()
Returns the exception thrown when committing the transaction. If no exception was thrown when committing the transaction, null is returned.

Returns:
The exception thrown when committing the transaction, or null.

getRollbackException

public java.lang.Throwable getRollbackException()
Returns the exception thrown when rolling back the transaction. If no exception was thrown when rolling back the transaction, null is returned.

Returns:
The exception thrown when rolling back the transaction, or null.

getSetAutoCommitFalseException

public java.lang.Throwable getSetAutoCommitFalseException()
Returns the exception thrown when calling setAutoCommit(false) on the connection. If no exception was thrown when calling setAutoCommit(false) on the connection, null is returned.

Returns:
The exception thrown when calling setAutoCommit(false) on the connection, or null.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable