Class QueryExecutionException

All Implemented Interfaces:
Serializable

public class QueryExecutionException extends RelixException
Thrown when a query started and did not finish.

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 Details

    • QueryExecutionException

      public QueryExecutionException(String message, Throwable cause)
      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 wrong
      cause - the underlying failure
      Since:
      1.0