Class QueryExecutionException
- All Implemented Interfaces:
Serializable
The counterpart to a plain RelixException, which says the query was never
runnable: this one says it was, and something outside the query gave way — a database
refusing connections, an HTTP endpoint answering 500, a file that moved, a value the
engine could not evaluate when it reached it.
The distinction is the one a caller acts on. A malformed query is a defect in the program and retrying it changes nothing; a backend that is down is a fact about the world at one moment, and retrying, failing over or reporting are all reasonable.
The message is the underlying failure's own, so nothing is buried by the wrapping: for a source it names the source, and the cause carries the driver's exception for a caller that wants to look further.
It arrives from a collecting terminal as that terminal fails, and from
Relation.stream() while the caller is iterating — a lazy stream does
its work when pulled, so a failure reaches the loop rather than the call that opened it.
- Since:
- 1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionQueryExecutionException(String message, Throwable cause) Creates an exception with the given message and 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
-
QueryExecutionException
Creates an exception with the given message and cause.There is no message-only form. Something always gave way for this to be raised, and that something is worth keeping: a constructor that discarded it would make the driver's own exception unreachable from the one the caller catches.
- Parameters:
message- what went wrongcause- the underlying failure- Since:
- 1.0
-