Package io.github.jbastgen.stemma.app.ai
Class AiException
java.lang.Object
java.lang.Throwable
java.lang.Exception
io.github.jbastgen.stemma.app.ai.AiException
- All Implemented Interfaces:
Serializable
A request to an AI service failed. The message is meant for the user and never contains the API key.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAiException(String message, boolean retryable) AiException(String message, boolean retryable, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether trying again may help (network trouble, an overloaded service).Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AiException
- Parameters:
message- what went wrong, in words for the userretryable- whether trying again may help (a timeout, an overloaded server)
-
AiException
- Parameters:
message- what went wrong, in words for the userretryable- whether trying again may helpcause- the technical reason
-
-
Method Details
-
retryable
public boolean retryable()Whether trying again may help (network trouble, an overloaded service).
-