Skip to main content
Module

x/sqlite/mod.ts>SqliteError

Deno SQLite module
Go to Latest
class SqliteError
extends Error
import { SqliteError } from "https://deno.land/x/sqlite@v3.7.2/mod.ts";

Errors which can occur while interacting with a database.

This is an extension over the standard JS Error object which provides additional details.

Constructors

new
SqliteError(context: Wasm | string, code?: Status)

Instances of this class should not be constructed directly and only be obtained from exceptions raised in this module.

Properties

code: Status

The SQLite status code which caused this error.

Errors that originate in the JavaScript part of the library will not have an associated status code. For these errors, the code will be Status.Unknown.

These codes are accessible via the exported Status object.

readonly
codeName: keyof Status

Key of code in exported status object.

E.g. if code is 19, codeName would be SqliteConstraint.