Package org.chocosolver.solver.exception
Class ContradictionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.chocosolver.solver.exception.ContradictionException
-
- All Implemented Interfaces:
Serializable
public final class ContradictionException extends Exception
A specificException
to deal with contradiction. A contradiction appears when at least oneVariable
object is not coherent regarding all or part ofConstraint
network. Empty domain, instantiation to an out-of-domain value, etc. throws contradiction. For performance consideration, aContradictionException
is created every time a contradiction occurs. A unique object is build and set with specific case information.- Since:
- 0.01
- Version:
- 0.01, june 2010
- Author:
- Xavier Lorca, Charles Prud'homme
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ContradictionException()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Throwable
fillInStackTrace()
ContradictionException
set(ICause c, Variable v, String s)
Throws the uniqueContradictionException
filled with the specified parameters.String
toString()
-
Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Method Detail
-
set
public ContradictionException set(ICause c, Variable v, String s)
Throws the uniqueContradictionException
filled with the specified parameters.- Parameters:
c
- the constraint at the origin of the contradictionv
- the variable concerned by the contradictions
- the message to print- Returns:
- ContradictionException the filled exception
-
fillInStackTrace
public Throwable fillInStackTrace()
- Overrides:
fillInStackTrace
in classThrowable
-
-