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 specificExceptionto deal with contradiction. A contradiction appears when at least oneVariableobject is not coherent regarding all or part ofConstraintnetwork. Empty domain, instantiation to an out-of-domain value, etc. throws contradiction. For performance consideration, aContradictionExceptionis 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 ThrowablefillInStackTrace()ContradictionExceptionset(ICause c, Variable v, String s)Throws the uniqueContradictionExceptionfilled with the specified parameters.StringtoString()-
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 uniqueContradictionExceptionfilled 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:
fillInStackTracein classThrowable
-
-