coolqlite.errors

Warning

Except for CoolqliteError and CoolqliteExceptionGroup, these are unstable and may change.

exception coolqlite.errors.CoolqliteError

Bases: Exception

A base exception for all standard coolqlite errors.

exception coolqlite.errors.CoolqliteExceptionGroup

Bases: ExceptionGroup[E], CoolqliteError, Generic

A base exceptiongroup for all standard coolqlite errors.

exception coolqlite.errors.MissingNamedToSqlFnError(name: str)

Bases: CoolqliteError

A named adapter was missing.

exception coolqlite.errors.MissingTypedToSqlFnError

Bases: CoolqliteError

A value was given of a type the converter didn’t know how to handle.

type coolqlite.errors.MissingToSqlFnError = MissingTypedToSqlFnError | MissingNamedToSqlFnError
exception coolqlite.errors.ToSqlFnSetupError

Bases: CoolqliteError

An error occurred while setting up a tosql function.

exception coolqlite.errors.ToSqlTypeError

Bases: CoolqliteTypeError

A type error related to converting to sql.

exception coolqlite.errors.FromSqlTypeError

Bases: CoolqliteTypeError

A type error related to converting from sql.

exception coolqlite.errors.IncorrectTransactionControlError

Bases: CoolqliteError

Something incorrect happened when using savepoints. This should only happen if using the savepoint context manager incorrectly, or otherwise doing something that would break a savepoint correctness guarantee.

exception coolqlite.errors.ParamMissingToSqlFnError(param: Param, cause: MissingToSqlFnError)

Bases: CoolqliteError

A converter fn was missing. See error message for details.

param: Param

The parameter whose converter couldn’t be found.

cause: MissingToSqlFnError

This should be the same as __cause__ but this helps guarantee it’s there.

exception coolqlite.errors.ToSqlFnFailure(param: Param)

Bases: CoolqliteError

A converter itself threw an exception.

param: Param

The parameter being processed when this error occurred.

exception coolqlite.errors.QueryBuilderErrorGroup(message, exceptions, *_args, **kwargs)

Bases: CoolqliteExceptionGroup[ParamMissingToSqlFnError | ToSqlFnFailure]

Errors that occurred during query building.

exception coolqlite.errors.ResultCountError(*, expected: _RowCount, actual: _RowCount)

Bases: CoolqliteError

A different number of rows than expected were returned.