ExSQL.Error exception (exsql v0.1.1)

Copy Markdown

Exception raised (internally) and returned (externally) for SQL errors.

Public API functions return {:error, %ExSQL.Error{}} rather than raising; the bang variants (ExSQL.execute!/2) raise it.

Summary

Types

t()

db is internal plumbing: OR FAIL / OR ROLLBACK conflict resolution attaches the database state the failed statement leaves behind (partial changes kept, or the transaction rolled back). It is scrubbed before errors reach the public API.

Types

t()

@type t() :: %ExSQL.Error{
  __exception__: term(),
  db: ExSQL.Database.t() | nil,
  line: pos_integer() | nil,
  message: String.t()
}

db is internal plumbing: OR FAIL / OR ROLLBACK conflict resolution attaches the database state the failed statement leaves behind (partial changes kept, or the transaction rolled back). It is scrubbed before errors reach the public API.