public class OperationException extends Exception
Operation
invocation.
This exception is thrown every time an invocation of a KnowledgeStore Operation
fails.
The outcome attribute (see getOutcome()
) provides the error / unknown operation
outcome at the root of this exception. The Throwable
s causing this exception (zero or
more) are also stored: method getCauses()
returns a list with all the causes, while
standard method Throwable.getCause()
returns only the last cause of the list (thus, only this
cause will be included in the stacktrace printed by Throwable.printStackTrace()
).
Constructor and Description |
---|
OperationException(Outcome outcome,
Iterable<? extends Throwable> causes)
Creates a new instance with the outcome and causes
Iterable specified. |
OperationException(Outcome outcome,
Throwable... causes)
Creates a new instance with the outcome and causes vararg array specified.
|
Modifier and Type | Method and Description |
---|---|
List<Throwable> |
getCauses()
Returns all the causes of this exception.
|
Outcome |
getOutcome()
Returns the error/unknown outcome associated to this exception.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public OperationException(Outcome outcome, Throwable... causes)
outcome
- the error/unknown outcome for this exceptioncauses
- a vararg array with the causes of this exception, possibly emptypublic OperationException(Outcome outcome, Iterable<? extends Throwable> causes)
Iterable
specified.outcome
- the error/unknown outcome for this exceptioncauses
- an iterable with the causes of this exception, not null, possibly emptypublic Outcome getOutcome()
Copyright © 2015–2016 FBK-irst. All rights reserved.