Package dev.dokimos.server.judge
Class JudgeCallException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.dokimos.server.judge.JudgeCallException
- All Implemented Interfaces:
Serializable
Unchecked failure raised when a judge HTTP call cannot complete. The
httpStatus carries the
response status, or -1 for a network or timeout error, so the worker can distinguish
retryable failures (5xx, timeout) from non-retryable ones (4xx).- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intStatus used when the failure is a network error or timeout rather than an HTTP response. -
Constructor Summary
ConstructorsConstructorDescriptionJudgeCallException(int httpStatus, String message) JudgeCallException(int httpStatus, String message, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionintbooleanReturns true when the failure is worth retrying: a timeout, network error, or 5xx response.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
NETWORK_ERROR
public static final int NETWORK_ERRORStatus used when the failure is a network error or timeout rather than an HTTP response.- See Also:
-
-
Constructor Details
-
JudgeCallException
-
JudgeCallException
-
-
Method Details
-
getHttpStatus
public int getHttpStatus() -
isRetryable
public boolean isRetryable()Returns true when the failure is worth retrying: a timeout, network error, or 5xx response.
-