Skip to content

Error

Raised when a SQLite operation fails for any reason other than the database being locked.

Catching Error also catches Busy, which extends it.

Example

open "mydb.sqlite" do |conn|
  try
    conn.execute t"INSERT INTO users (name) VALUES (${#name})" name: "Alice"
  catch Busy: _
    echo "database is busy"
  catch Error: e
    echo "sqlite error: $e"

Inherits from: std.RuntimeError