ExArrow.ADBC.Error (ex_arrow v0.4.0)

View Source

ADBC error or diagnostic message.

Drivers return errors as strings; ExArrow passes them through as {:error, message}. When available, message may include driver-specific details (e.g. SQLSTATE, vendor code). Use this module to normalize or inspect errors if you need structured handling.

Future versions may parse message into sqlstate and vendor_code where the driver provides them in a known format.

Summary

Functions

Wraps a raw error (string from NIF/driver) into an Error struct. sqlstate and vendor_code are left as nil unless parsed from the message.

Returns the error message (string). Accepts either an Error struct or a raw string for convenience.

Types

t()

@type t() :: %ExArrow.ADBC.Error{
  message: String.t(),
  sqlstate: String.t() | nil,
  vendor_code: integer() | nil
}

Functions

from_message(message)

@spec from_message(String.t()) :: t()

Wraps a raw error (string from NIF/driver) into an Error struct. sqlstate and vendor_code are left as nil unless parsed from the message.

message(msg)

@spec message(t() | String.t()) :: String.t()

Returns the error message (string). Accepts either an Error struct or a raw string for convenience.