BadStatementException

class BadStatementException(val messageEnum: BadStatementExceptionMessage, val errorPosition: Int? = null, queryContext: QueryContext? = null, cause: Throwable?) : FatalDatabaseException

Exception thrown when a query is semantically or syntactically invalid.

This exception covers:

  1. Framework Validation: Errors detected before sending the query to the DB (e.g., missing WHERE clause).

  2. Database Syntax/Access Errors: Errors returned by PostgreSQL (Class 42), such as typos in table names or incorrect SQL syntax.

As a FatalDatabaseException, it indicates a developer error that cannot be recovered from at runtime without code changes.

Constructors

Link copied to clipboard
constructor(messageEnum: BadStatementExceptionMessage, errorPosition: Int? = null, queryContext: QueryContext? = null, cause: Throwable?)

Properties

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

Functions

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

Subclasses can provide additional technical details here.

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

Enriches the exception with a full query context.

Link copied to clipboard

Enriches the exception with the transaction step index.