Package io.github.jdbcx

# Class SqlExceptionUtils

java.lang.Object
io.github.jdbcx.SqlExceptionUtils

public final class SqlExceptionUtils extends Object
Helper class for building `SQLException`.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`SQL_STATE_CLIENT_ERROR`
`static final String`
`SQL_STATE_CONNECTION_EXCEPTION`
`static final String`
`SQL_STATE_DATA_EXCEPTION`
`static final String`
`SQL_STATE_FEATURE_NOT_SUPPORTED`
`static final String`
`SQL_STATE_INVALID_SCHEMA`
`static final String`
`SQL_STATE_INVALID_TX_STATE`
`static final String`
`SQL_STATE_NO_DATA`
`static final String`
`SQL_STATE_OPERATION_CANCELLED`
`static final String`
`SQL_STATE_SQL_ERROR`

## Method Summary

Modifier and Type
Method
Description
`static BatchUpdateException`
`batchUpdateError(Throwable e, long[] updateCounts)`
`static SQLException`
`clientError(String message)`
`static SQLException`
`clientError(String message, Throwable e)`
`static SQLException`
`clientError(Throwable e)`
`static SQLException`
`forCancellation(Exception e)`
`static SQLException`
`handle(Exception e)`
`static SQLException`
`handle(Throwable e, Throwable... more)`
`static BatchUpdateException`
`queryInBatchError(int[] updateCounts)`
`static BatchUpdateException`
`queryInBatchError(long[] updateCounts)`
`static SQLException`
`undeterminedExecutionError()`
`static SQLException`
`unknownError()`
`static SQLFeatureNotSupportedException`
`unsupportedError(String message)`

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

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

## Field Details

### SQL_STATE_CLIENT_ERROR

public static final String SQL_STATE_CLIENT_ERROR

See Also:
  - Constant Field Values

### SQL_STATE_OPERATION_CANCELLED

public static final String SQL_STATE_OPERATION_CANCELLED

See Also:
  - Constant Field Values

### SQL_STATE_CONNECTION_EXCEPTION

public static final String SQL_STATE_CONNECTION_EXCEPTION

See Also:
  - Constant Field Values

### SQL_STATE_SQL_ERROR

public static final String SQL_STATE_SQL_ERROR

See Also:
  - Constant Field Values

### SQL_STATE_NO_DATA

public static final String SQL_STATE_NO_DATA

See Also:
  - Constant Field Values

### SQL_STATE_INVALID_SCHEMA

public static final String SQL_STATE_INVALID_SCHEMA

See Also:
  - Constant Field Values

### SQL_STATE_INVALID_TX_STATE

public static final String SQL_STATE_INVALID_TX_STATE

See Also:
  - Constant Field Values

### SQL_STATE_DATA_EXCEPTION

public static final String SQL_STATE_DATA_EXCEPTION

See Also:
  - Constant Field Values

### SQL_STATE_FEATURE_NOT_SUPPORTED

public static final String SQL_STATE_FEATURE_NOT_SUPPORTED

See Also:
  - Constant Field Values

## Method Details

### clientError

public static SQLException clientError(String message)

### clientError

public static SQLException clientError(Throwable e)

### clientError

public static SQLException clientError(String message, Throwable e)

### handle

public static SQLException handle(Exception e)

### handle

public static SQLException handle(Throwable e, Throwable... more)

### batchUpdateError

public static BatchUpdateException batchUpdateError(Throwable e, long[] updateCounts)

### queryInBatchError

public static BatchUpdateException queryInBatchError(int[] updateCounts)

### queryInBatchError

public static BatchUpdateException queryInBatchError(long[] updateCounts)

### undeterminedExecutionError

public static SQLException undeterminedExecutionError()

### forCancellation

public static SQLException forCancellation(Exception e)

### unsupportedError

public static SQLFeatureNotSupportedException unsupportedError(String message)

### unknownError

public static SQLException unknownError()