Class SnowflakeSQLException

    • Constructor Detail

      • SnowflakeSQLException

        public SnowflakeSQLException​(String queryId,
                                     String reason,
                                     String sqlState,
                                     int vendorCode)
        This constructor should only be used for error from Global service. Since Global service has already built the error message, we use it as is. For any errors local to JDBC driver, we should use one of the constructors below to build the error message.
        Parameters:
        queryId - query id
        reason - reason for which exception is created
        sqlState - sql state
        vendorCode - vendor code
      • SnowflakeSQLException

        public SnowflakeSQLException​(String queryId,
                                     String reason,
                                     String sqlState)
        Parameters:
        queryId - the queryID
        reason - exception reason
        sqlState - the SQL state
      • SnowflakeSQLException

        public SnowflakeSQLException​(String queryId,
                                     String sqlState,
                                     int vendorCode)
        Parameters:
        queryId - query ID
        sqlState - SQL state
        vendorCode - vendor code
      • SnowflakeSQLException

        public SnowflakeSQLException​(String queryId,
                                     String sqlState,
                                     int vendorCode,
                                     Object... params)
        Parameters:
        queryId - query ID
        sqlState - the SQL state
        vendorCode - the vendor code
        params - additional parameters
      • SnowflakeSQLException

        public SnowflakeSQLException​(Throwable ex,
                                     String sqlState,
                                     int vendorCode)
        Parameters:
        ex - Throwable exception
        sqlState - the SQL state
        vendorCode - the vendor code
      • SnowflakeSQLException

        public SnowflakeSQLException​(Throwable ex,
                                     ErrorCode errorCode,
                                     Object... params)
        Parameters:
        ex - Throwable exception
        errorCode - the error code
        params - additional parameters
      • SnowflakeSQLException

        public SnowflakeSQLException​(String queryId,
                                     Throwable ex,
                                     String sqlState,
                                     int vendorCode,
                                     Object... params)
        Parameters:
        queryId - query ID
        ex - Throwable exception
        sqlState - the SQL state
        vendorCode - the vendor code
        params - additional parameters
      • SnowflakeSQLException

        public SnowflakeSQLException​(ErrorCode errorCode,
                                     Object... params)
        Parameters:
        errorCode - the error code
        params - additional parameters
      • SnowflakeSQLException

        public SnowflakeSQLException​(String queryId,
                                     ErrorCode errorCode,
                                     Object... params)
        Parameters:
        queryId - query ID
        errorCode - error code
        params - additional parameters
      • SnowflakeSQLException

        public SnowflakeSQLException​(ErrorCode errorCode,
                                     int retryCount,
                                     boolean issocketTimeoutNoBackoff,
                                     long elapsedSeconds)
        Parameters:
        errorCode - error code
        retryCount - retry count
        issocketTimeoutNoBackoff - isSocketTimeoutNoBackoff
        elapsedSeconds - time elapsed in seconds
      • SnowflakeSQLException

        public SnowflakeSQLException​(SFException e)
        Parameters:
        e - the SFException
      • SnowflakeSQLException

        public SnowflakeSQLException​(String reason)
      • SnowflakeSQLException

        public SnowflakeSQLException​(Throwable ex,
                                     String message)
    • Method Detail

      • getQueryId

        public String getQueryId()
      • getRetryCount

        public int getRetryCount()
      • issocketTimeoutNoBackoff

        public boolean issocketTimeoutNoBackoff()
      • getElapsedSeconds

        public long getElapsedSeconds()