Error Handling
View SourceDuckdbEx maps DuckDB error strings into structured exceptions. Most functions
return {:error, exception} tuples.
case DuckdbEx.execute("SELECT * FROM missing_table") do
{:ok, _} -> :ok
{:error, exception} -> IO.inspect(exception)
endCommon exception types:
DuckdbEx.Exceptions.CatalogExceptionDuckdbEx.Exceptions.ParserExceptionDuckdbEx.Exceptions.InvalidInputExceptionDuckdbEx.Exceptions.ConstraintException
When using the CLI backend, error messages are emitted on stderr and converted to the closest matching exception type.