NitroSQLite

API Reference / react-native-nitro-sqlite / NitroSQLiteError

Class: NitroSQLiteError

Error thrown by managed NitroSQLite operations. Native errors are wrapped with this class.

Extends

  • Error

Constructors

Constructor

new NitroSQLiteError(message, options?): NitroSQLiteError

Create an error with a message and optional cause.

Parameters

message

string

options?

ErrorOptions

Returns

NitroSQLiteError

Overrides

Error.constructor

Properties

type

readonly type: NitroSQLiteExceptionType | undefined

Native exception category, if this error originated in NitroSQLite's C++ code.

Methods

fromError()

static fromError(error): NitroSQLiteError

Convert an unknown thrown value to NitroSQLiteError. Existing instances pass through; Error values keep their stack and cause.

Parameters

error

unknown

Value to normalize.

Returns

NitroSQLiteError

A NitroSQLiteError instance.