← Back to Stormify Documentation

SQLException

constructor(message: String?)

Creates a new SQLException with a message and no driver metadata.

Parameters

message

The error message describing what went wrong.


constructor(message: String?, cause: Throwable?)

Creates a new SQLException wrapping an underlying cause. When the cause is a driver exception that carries vendor metadata, sqlState and errorCode are extracted from it automatically.

Parameters

message

The error message describing what went wrong.

cause

The underlying cause of the error (e.g., JDBC SQLException, native driver error).


constructor(message: String?, cause: Throwable?, sqlState: String?, errorCode: Int?)

Creates a new SQLException with explicit driver metadata. Used by KDBC's platform-specific code paths that already know the vendor-reported sqlState and errorCode (e.g. native drivers reading them directly through their C API).

Parameters

message

The error message describing what went wrong.

cause

The underlying cause of the error, or null when the error is raised without a wrapped exception.

sqlState

The SQLSTATE code reported by the driver, or null.

errorCode

The vendor-specific error code reported by the driver, or null.