JBoss.orgCommunity Documentation
The diagram below explains the overall structure of the OptaPlanner source code:
Fail fast. There are several levels of fail fast, from better to worse:
Exception
messages
The Exception
message must include the name and state of each relevant variable.
For example:
if (fooSize < 0) {
throw new IllegalArgumentException("The fooSize (" + fooSize + ") of bar (" + this + ") must be positive.");
}
Notice that the output clearly explains what's wrong:
Exception in thread "main" java.lang.IllegalArgumentException: The fooSize (-5) must be positive.
at ...
Whenever possible, the Exception
message must include context.
Whenever the fix is not obvious, the Exception
message must include advice.
Exception in thread "main" java.lang.IllegalArgumentException: UndoMove corruption: ...
1) Check your custom createUndoMove() of ...
2) Check your custom Variable listeners if ...
at ...