Package dev.dokimos.core.exceptions
Class DokimosTypeConversionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.dokimos.core.exceptions.DokimosTypeConversionException
- All Implemented Interfaces:
Serializable
Thrown when a stored output value cannot be converted to the requested type by one of the typed
read accessors (for example
EvalTestCase.actualOutputAs(Class) or Example.expectedOutputAs(dev.dokimos.core.OutputType)).
This is an unchecked exception: a conversion failure is a programming/data error (the requested type does not match the shape of the stored value), not a recoverable condition callers are expected to handle on every call. The evaluation path catches it and scores the affected item as failed rather than aborting the whole run.
The underlying cause (a Jackson conversion error) is attached via Throwable.getCause() for
diagnostics, typed as Throwable.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDokimosTypeConversionException(String message) Creates an exception with the given detail message.DokimosTypeConversionException(String message, Throwable cause) Creates an exception with the given detail message and underlying cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DokimosTypeConversionException
Creates an exception with the given detail message.- Parameters:
message- a human-readable description of the conversion failure
-
DokimosTypeConversionException
Creates an exception with the given detail message and underlying cause.- Parameters:
message- a human-readable description of the conversion failurecause- the underlying error that triggered the failure (for example a Jackson conversion error), typed asThrowable
-