Class CustomGradingResult
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.github.guillaumederval.javagrading.CustomGradingResult
-
- All Implemented Interfaces:
Serializable
public class CustomGradingResult extends Exception
Allow a test to return a custom feedback- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description StringfeedbackdoublegradeExceptionorigExceptionTestStatusstatus
-
Constructor Summary
Constructors Constructor Description CustomGradingResult(TestStatus status)CustomGradingResult(TestStatus status, double grade)CustomGradingResult(TestStatus status, double grade, Exception origException)CustomGradingResult(TestStatus status, double grade, String feedback)CustomGradingResult(TestStatus status, double grade, String feedback, Exception origException)CustomGradingResult(TestStatus status, Exception origException)CustomGradingResult(TestStatus status, String feedback)CustomGradingResult(TestStatus status, String feedback, Exception origException)
-
Method Summary
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
feedback
public final String feedback
-
status
public final TestStatus status
-
grade
public final double grade
-
origException
public final Exception origException
-
-
Constructor Detail
-
CustomGradingResult
public CustomGradingResult(TestStatus status, double grade, String feedback, Exception origException)
- Parameters:
status-grade- the grade. must be NaN to avoid defining a custom grade. Always set to NaN when status == IGNOREDfeedback- a string describing the feedback, or nullorigException- original exception, or null
-
CustomGradingResult
public CustomGradingResult(TestStatus status, double grade, String feedback)
-
CustomGradingResult
public CustomGradingResult(TestStatus status, double grade)
-
CustomGradingResult
public CustomGradingResult(TestStatus status, String feedback)
-
CustomGradingResult
public CustomGradingResult(TestStatus status, String feedback, Exception origException)
-
CustomGradingResult
public CustomGradingResult(TestStatus status, double grade, Exception origException)
-
CustomGradingResult
public CustomGradingResult(TestStatus status, Exception origException)
-
CustomGradingResult
public CustomGradingResult(TestStatus status)
-
-