Bun

class

sqlite.SQLiteError

class SQLiteError

Errors from SQLite have a name SQLiteError.

  • readonly byteOffset: number

    The UTF-8 byte offset of the sqlite3 query that failed, if known

    This corresponds to sqlite3_error_offset.

  • cause?: unknown

    The cause of the error.

  • code?: string

    The name of the SQLite3 error code

    "SQLITE_CONSTRAINT_UNIQUE"
    
  • errno: number

    The SQLite3 extended error code

    This corresponds to sqlite3_extended_errcode.

  • message: string
  • readonly name: 'SQLiteError'
  • stack?: string
  • static stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

  • targetObject: object,
    constructorOpt?: Function
    ): void;

    Create .stack property on a target object

  • static isError(
    value: unknown
    ): value is Error;

    Check if a value is an instance of Error

    @param value

    The value to check

    @returns

    True if the value is an instance of Error, false otherwise

  • err: Error,
    stackTraces: CallSite[]
    ): any;