Class ConnectorException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.snowflake.connectors.common.exception.ConnectorException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ConnectionConfigurationNotFoundException
,ConnectorConfigurationNotFoundException
,ConnectorConfigurationParsingException
,ConnectorStatusNotFoundException
,DuplicateKeyException
,InaccessibleWarehouseException
,InstanceNotFoundException
,InternalConnectorException
,InvalidConnectorConfigurationStatusException
,InvalidConnectorResponseException
,InvalidConnectorStatusException
,InvalidIdentifierException
,InvalidInputException
,InvalidObjectNameException
,InvalidReferenceException
,InvalidReferenceNameException
,InvalidSchemaNameException
,KeyNotFoundException
,NonexistentProcedureCallException
,RecordsLimitExceededException
,RequiredPrivilegesMissingException
,ResourceCreationException
,ResourceDisablingException
,ResourceEnablingException
,ResourceUpdateException
,SchedulerCreationException
,TaskCreationException
,TaskNotFoundException
,TaskReactorInstanceIsActiveException
,UnknownConnectorException
,UnknownSqlException
,VariantMapperException
,WarehouseAlreadyUsedException
,WorkerJobCancelledException
,WorkItemQueueException
public class ConnectorException extends RuntimeException
Main exception for the connector errors. It is recommended that this class is extended and custom exceptions are created and thrown.The message of this exception is derived from the provided exception message or a message of the provided response.
For more explanation about the response and context properties see
ConnectorResponse
andExceptionContext
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConnectorException(ConnectorResponse response)
Creates a newConnectorException
, with a provided response and an empty exception context.ConnectorException(ConnectorResponse response, ExceptionContext context)
Creates a newConnectorException
, with a provided response and exception context.ConnectorException(ConnectorResponse response, ExceptionContext context, Throwable cause)
Creates a newConnectorException
, with a provided response, exception context and an exception cause.ConnectorException(ConnectorResponse response, Throwable cause)
Creates a newConnectorException
, with a provided response and an exception cause.ConnectorException(String responseCode, String message)
Creates a newConnectorException
, with a provided response code, message and an empty exception context.ConnectorException(String responseCode, String message, ExceptionContext context)
Creates a newConnectorException
, with a provided response code, message and exception context.ConnectorException(String responseCode, String message, ExceptionContext context, Throwable cause)
Creates a newConnectorException
, with a provided response code, message, exception context and an exception cause.ConnectorException(String responseCode, String message, Throwable cause)
Creates a newConnectorException
, with a provided response code, message, an empty exception context and an exception cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExceptionContext
getContext()
Context of this exception.ConnectorResponse
getResponse()
Connector response of this exception.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ConnectorException
public ConnectorException(String responseCode, String message)
Creates a newConnectorException
, with a provided response code, message and an empty exception context.- Parameters:
responseCode
- exception response codemessage
- exception message
-
ConnectorException
public ConnectorException(ConnectorResponse response)
Creates a newConnectorException
, with a provided response and an empty exception context.- Parameters:
response
- exception response
-
ConnectorException
public ConnectorException(String responseCode, String message, ExceptionContext context)
Creates a newConnectorException
, with a provided response code, message and exception context.- Parameters:
responseCode
- exception response codemessage
- exception messagecontext
- exception context
-
ConnectorException
public ConnectorException(ConnectorResponse response, ExceptionContext context)
Creates a newConnectorException
, with a provided response and exception context.- Parameters:
response
- exception responsecontext
- exception context
-
ConnectorException
public ConnectorException(String responseCode, String message, Throwable cause)
Creates a newConnectorException
, with a provided response code, message, an empty exception context and an exception cause.- Parameters:
responseCode
- exception response codemessage
- exception messagecause
- exception cause
-
ConnectorException
public ConnectorException(ConnectorResponse response, Throwable cause)
Creates a newConnectorException
, with a provided response and an exception cause.- Parameters:
response
- exception responsecause
- exception cause
-
ConnectorException
public ConnectorException(String responseCode, String message, ExceptionContext context, Throwable cause)
Creates a newConnectorException
, with a provided response code, message, exception context and an exception cause.- Parameters:
responseCode
- exception response codemessage
- exception messagecontext
- exception contextcause
- exception cause
-
ConnectorException
public ConnectorException(ConnectorResponse response, ExceptionContext context, Throwable cause)
Creates a newConnectorException
, with a provided response, exception context and an exception cause.- Parameters:
response
- exception responsecontext
- exception contextcause
- exception cause
-
-
Method Detail
-
getResponse
public ConnectorResponse getResponse()
Connector response of this exception.- Returns:
- underlying response of this exception
-
getContext
public ExceptionContext getContext()
Context of this exception.- Returns:
- context of this exception
-
-