Class ResultCheckerException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
org.dellroad.javabox.ResultCheckerException
- All Implemented Interfaces:
Serializable
Exception thrown by a
ResultChecker when a requirement is violated.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionResultCheckerException(ScriptResult result, int snippetIndex, String message) Constructor.ResultCheckerException(ScriptResult result, int snippetIndex, String message, Throwable cause) Constructor.ResultCheckerException(ScriptResult result, String message) Constructor for exceptions that are not specific to a single snippet.ResultCheckerException(ScriptResult result, String message, Throwable cause) Constructor for exceptions that are not specific to a single snippet. -
Method Summary
Modifier and TypeMethodDescriptionresult()Get theScriptResultwhich generated this exception.intGet the index of the snippet that generated this exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ResultCheckerException
Constructor for exceptions that are not specific to a single snippet.- Parameters:
result- the result that generated this exceptionmessage- exception message, or null for none
-
ResultCheckerException
Constructor for exceptions that are not specific to a single snippet.- Parameters:
result- the result that generated this exceptionmessage- exception message, or null for nonecause- underlying cause, or null for none
-
ResultCheckerException
Constructor.- Parameters:
result- the result that generated this exceptionsnippetIndex- offending snippet index, or -1 if not specific to a single snippetmessage- exception message, or null for none
-
ResultCheckerException
public ResultCheckerException(ScriptResult result, int snippetIndex, String message, Throwable cause) Constructor.- Parameters:
result- the result that generated this exceptionsnippetIndex- offending snippet index, or -1 if not specific to a single snippetmessage- exception message, or null for nonecause- underlying cause, or null for none
-
-
Method Details
-
result
Get theScriptResultwhich generated this exception.- Returns:
- the result that generated this exception
-
snippetIndex
public int snippetIndex()Get the index of the snippet that generated this exception.- Returns:
- snippet index, or -1 if this error is not specific to a single snippet
-