Skip to content

Commit

Permalink
call error_to_exception/1 in Connection.prepare/2
Browse files Browse the repository at this point in the history
  • Loading branch information
cocoa-xu committed Jan 6, 2024
1 parent 799932a commit b91f4a9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/adbc_connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ defmodule Adbc.Connection do
with stmt <- create_statement(conn, query),
:ok <- Adbc.Nif.adbc_statement_prepare(stmt) do
{:ok, stmt}
else
{:error, reason} ->
{:error, error_to_exception(reason)}
end
end

Expand Down

0 comments on commit b91f4a9

Please sign in to comment.