Package com.clickhouse.client.api
Class ServerException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.clickhouse.client.api.ServerException
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionServerException(int code, String message) ServerException(int code, String message, int transportProtocolCode) -
Method Summary
Modifier and TypeMethodDescriptionintgetCode()Returns CH server error code.intReturns error code of underlying transport protocol.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
CODE_UNKNOWN
public static final int CODE_UNKNOWN- See Also:
-
TABLE_NOT_FOUND
public static final int TABLE_NOT_FOUND- See Also:
-
-
Constructor Details
-
ServerException
-
ServerException
-
-
Method Details
-
getCode
public int getCode()Returns CH server error code. May return 0 if code is unknown.- Returns:
- - error code from server response
-
getTransportProtocolCode
public int getTransportProtocolCode()Returns error code of underlying transport protocol. For example, HTTP status. By default, will return500what is derived from HTTP Server Internal Error.- Returns:
- - transport status code
-