Package org.graffiti.plugin.algorithm
Class PreconditionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.graffiti.plugin.algorithm.PreconditionException
- All Implemented Interfaces:
Serializable
public class PreconditionException extends Exception
Throws in the context of precondition failures.
- See Also:
- Serialized Form
- Recent revisions:
- 2.6.5
-
Constructor Summary
Constructors Constructor Description PreconditionException()
Creates a new PreconditionException object.PreconditionException(String msg)
Creates a new PreconditionException object. -
Method Summary
Modifier and Type Method Description void
add(String cause)
Adds a new cause message without a source.void
add(String cause, Object source)
Adds a new cause message, together with the responsible source.String
getMessage()
boolean
isEmpty()
Checks, if this PreconditionException contains any error entries.Iterator<org.graffiti.plugin.algorithm.PreconditionException.Entry>
iterator()
Returns an iterator over allError
s.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PreconditionException
Creates a new PreconditionException object.- Parameters:
msg
- error entry describing the cause
-
PreconditionException
public PreconditionException()Creates a new PreconditionException object.
-
-
Method Details
-
isEmpty
public boolean isEmpty()Checks, if this PreconditionException contains any error entries.- Returns:
- true, when there haven't been added any messages
-
getMessage
- Overrides:
getMessage
in classThrowable
-
add
Adds a new cause message, together with the responsible source.- Parameters:
cause
- message about the reasonsource
- an Object from which it originated the exception
-
add
Adds a new cause message without a source.- Parameters:
cause
- message about the reason
-
iterator
Returns an iterator over allError
s.- Returns:
- an iterator.
-