- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
QueryExecutionException,SandboxViolationException,UnboundedRelationException
Unchecked, and the default across the API: a caller writing a query in Java has made
a mistake, and a stack trace at the call site is what locates it. The exception is
Relix.validate, which returns Diagnostics instead — for the caller
assembling text or trees from user input, where a bad query is an expected
outcome to render rather than a bug to raise.
The root of everything this API throws
Catching this catches all of it. That is a claim a caller writes code against, so it
is one the engine's own exception types cannot be allowed to break: a query is executed
by modules that know nothing of this package, and their failures are restated here
rather than passed through, the same adaptation that turns a Row into a
Tuple. The original is kept as the cause and its message is carried unchanged.
Two subtypes say what kind of wrong it is, because a caller acts on the difference:
QueryExecutionException— the query ran and something outside it gave way. A fact about the world at one moment, so retrying, failing over or alerting are all reasonable.UnboundedRelationException— a collecting terminal was asked for a relation that never ends, or the planner met an operator that would have to buffer one. Nothing failed; bound it, or take it withstream.
This type raised on its own means the query was never runnable — it would not parse, it names something nothing declares, or the session is closed. Retrying changes nothing; the program has to.
What is not restated is a programming error in the call itself. A null
argument is an NullPointerException from the null check that found it, because
that is what a Java caller expects and wrapping it would say the engine had an opinion
about it.
- Since:
- 1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRelixException(String message) Creates an exception with the given message.RelixException(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
-
RelixException
Creates an exception with the given message.- Parameters:
message- what went wrong- Since:
- 1.0
-
RelixException
Creates an exception with the given message and cause.- Parameters:
message- what went wrongcause- the underlying failure- Since:
- 1.0
-