Package com.couchbase.client.core.error
Class QueryException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.couchbase.client.core.error.CouchbaseException
-
- com.couchbase.client.core.error.QueryException
-
- All Implemented Interfaces:
Serializable
public class QueryException extends CouchbaseException
There was a problem fulfilling the query request.Check
errors()
for further details. TODO: needs to go away once all the manaagement APIs are refactored- Since:
- 2.0.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description QueryException(byte[] content)
QueryException(QueryException cause)
QueryException(String message, Collection<ErrorCodeAndMessage> errors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
code()
Returns the numeric error code from the query service.List<ErrorCodeAndMessage>
errors()
Returns the full list of errors and warnings associated with the exception.boolean
hasErrorCode(int code)
String
msg()
Returns a human-readable description of the error, as reported by the query service.-
Methods inherited from class com.couchbase.client.core.error.CouchbaseException
context, getMessage
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
QueryException
public QueryException(QueryException cause)
-
QueryException
public QueryException(byte[] content)
-
QueryException
public QueryException(String message, Collection<ErrorCodeAndMessage> errors)
-
-
Method Detail
-
msg
public String msg()
Returns a human-readable description of the error, as reported by the query service.
-
code
public int code()
Returns the numeric error code from the query service.These are detailed in the N1QL Error Codes documentation.
-
errors
public List<ErrorCodeAndMessage> errors()
Returns the full list of errors and warnings associated with the exception. Possible error codes are detailed in the N1QL Error Codes documentation.
-
hasErrorCode
public boolean hasErrorCode(int code)
-
-