Class QueryException

All Implemented Interfaces:
Serializable

public class QueryException extends ServerException
Query execution failure (not executed, timed out, cancelled).

Details use the {kind, details?} format with variants defined in QueryDetailKind.

See Also:
  • Method Details

    • isNotExecuted

      public boolean isNotExecuted()
      Returns true when the query was not executed (e.g. a previous statement in a multi-statement query failed).
      Returns:
      whether the detail kind is NotExecuted
    • isTimedOut

      public boolean isTimedOut()
      Returns true when the query timed out.
      Returns:
      whether the detail kind is TimedOut
    • isCancelled

      public boolean isCancelled()
      Returns true when the query was cancelled.
      Returns:
      whether the detail kind is Cancelled
    • getTimeout

      public Map<String,Object> getTimeout()
      Returns the timeout duration when the query timed out, as a map containing "secs" and "nanos" keys.
      Returns:
      the timeout map, or null