net.snowflake.client.jdbc

## Class SnowflakeSQLException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.sql.SQLException
      - - net.snowflake.client.jdbc.SnowflakeSQLException

All Implemented Interfaces:
  Serializable, Iterable<Throwable>

    public class SnowflakeSQLException
    extends SQLException

Author:
  jhuang
See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`SnowflakeSQLException(ErrorCode errorCode, Object... params)`
`SnowflakeSQLException(String sqlState, int vendorCode)`
`SnowflakeSQLException(String sqlState, int vendorCode, Object... params)`
`SnowflakeSQLException(String queryId, String reason, String sqlState, int vendorCode)` This constructor should only be used for error from Global service.
`SnowflakeSQLException(Throwable ex, String sqlState, int vendorCode)`
`SnowflakeSQLException(Throwable ex, String sqlState, int vendorCode, Object... params)`

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getQueryId()`

### Methods inherited from class java.sql.SQLException

`getErrorCode, getNextException, getSQLState, iterator, setNextException`

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### 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 sqlState,
                                 int vendorCode)

#### SnowflakeSQLException

    public SnowflakeSQLException(String sqlState,
                                 int vendorCode,
                                 Object... params)

#### SnowflakeSQLException

    public SnowflakeSQLException(Throwable ex,
                                 String sqlState,
                                 int vendorCode)

#### SnowflakeSQLException

    public SnowflakeSQLException(Throwable ex,
                                 String sqlState,
                                 int vendorCode,
                                 Object... params)

#### SnowflakeSQLException

    public SnowflakeSQLException(ErrorCode errorCode,
                                 Object... params)

### Method Detail

#### getQueryId

    public String getQueryId()