PlenException#
Abstract base of every exception the engine throws: InputException for invalid input, and ProjectException for a call that doesn't fit the project's state. It's unchecked, so no method declares it in throws. Catch it to handle any engine failure in one place.
Declaration#
;
Constructors#
PlenException#
public
Sets the exception message. Called by the subclass constructors; application code doesn't create engine exceptions.
Parameters
| Name | Type | Description |
|---|---|---|
message |
String |
Text returned by getMessage() |
Methods#
getMessage#
public String
Inherited from Throwable. The text depends on the subclass: the validation message for InputException, the kebab-case error code ("no-baseline", "stale-baseline", "needs-resync") for ProjectException.
Returns the message passed to the constructor.
Subclasses#
| Subclass | When it occurs |
|---|---|
InputException |
The input is invalid. kind and path say what failed and where. |
ProjectException |
The call doesn't fit the project's state. code names the state. |
Each operation page lists which of the two it throws. MatchException, thrown by SkillLayer.slots, doesn't extend PlenException; its toPlenException() returns the matching InputException or ProjectException. JDK exceptions (NullPointerException for a null argument, and others) don't extend it either. Conflicts, cycles, failure to converge and operations rejected by Project#apply come back in results, not as exceptions. See Error handling.
Example#
;
;
Related#
InputException- invalid inputProjectException- a call that doesn't fit the project stateMatchException- the skill layer's exception, outside this hierarchy- Error handling - catching engine errors in one place