org.multiverse.api.exceptions
Class ControlFlowError
java.lang.Object
java.lang.Throwable
java.lang.Error
org.multiverse.api.exceptions.ControlFlowError
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- ReadConflict, Retry, SpeculativeConfigurationFailure, WriteConflict
public abstract class ControlFlowError
- extends java.lang.Error
A Error that is used to regulate control flow inside multiverse, to be more specific
jump from code to the handler the transaction management logic (instrumented or
SpeculativeConfigurationFailure) so it doesn't indicate a
bad thing.
Normally it would be a very bad thing to regulate control flow using an exception/error, but
to make seamless integration in the Java language possible, there is no better alternative.
So you should not catch these exceptions unless you really know what you are doing.
It is an Error instead of a RuntimeException, to prevent users trying to catch the error
inside a try/catch(RuntimeException) block and consuming important events like a ReadConflict
or a WriteConflict. In most cases these events can be solved by retrying the transaction.
- Author:
- Peter Veentjer
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ControlFlowError
public ControlFlowError()
ControlFlowError
public ControlFlowError(java.lang.Throwable cause)
ControlFlowError
public ControlFlowError(java.lang.String message)
ControlFlowError
public ControlFlowError(java.lang.String message,
java.lang.Throwable cause)
getDescription
public abstract java.lang.String getDescription()
Copyright © 2008-2010 Multiverse. All Rights Reserved.