InvalidOperationException

Exception thrown when the driver attempts an operation that is not allowed in the current state or context.

Examples include trying to commit when auto-commit is enabled, operating on a closed statement, using unsupported features, or asking a query for something the call itself did not make possible.

Purely client-side: nothing here was reported by the server, so there is no sqlState and no serverErrorMessage. Raised inside a query, it still carries the queryContext - the SQL and the parameters - the way every driver exception does.

Constructors

Link copied to clipboard
constructor(reason: InvalidOperationExceptionReason, details: String? = null)

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard

Additional details about the failure.

Link copied to clipboard
open val message: String?
Link copied to clipboard

The context of the query that resulted in this exception, if applicable.

Link copied to clipboard

The specific type of invalid operation.

Link copied to clipboard

The raw error message received from the database, if applicable.

Link copied to clipboard

The SQL state code associated with the error, if applicable.

Functions

Link copied to clipboard

Finds the Octavius failure behind this throwable, if there is one.

Link copied to clipboard
open override fun getDetailedMessage(): String

Provides a detailed, human-readable description of the error.

Link copied to clipboard
open override fun toString(): String