Skip to main content Link Search Menu Expand Document (external link)

CrSqlErrors overview

Error types for CR-SQLite operations.

This module defines tagged errors used throughout the CR-SQLite package for handling various failure scenarios in a type-safe manner.

Example

import * as CrSqlErrors from "@effect-native/crsql/CrSqlErrors"
import { Effect } from "effect"

// Handle specific error types
const program = Effect.fail(new CrSqlErrors.CrSqliteExtensionMissing()).pipe(
  Effect.catchTag("CrSqliteExtensionMissing", (error) => Effect.succeed("handled error"))
)

Added in v0.1.0


Table of contents


Errors

CrSqliteExtensionMissing (class)

Error indicating that the CR-SQLite extension is not loaded or available.

This error occurs when attempting to use CR-SQLite functionality but the extension has not been properly loaded into the SQLite connection. This typically happens when the extension file is missing or when LOAD EXTENSION has not been called.

Signature

export declare class CrSqliteExtensionMissing

Added in v0.1.0

UnhexUnavailable (class)

Error indicating that the unhex() function is not available in SQLite.

This error occurs when attempting to use hex decoding functionality that requires the unhex() function, but it’s not available in the current SQLite installation or version.

Signature

export declare class UnhexUnavailable

Added in v0.1.0