Skip to content

Commit

Permalink
fix: error reporting on prepared statements (#16)
Browse files Browse the repository at this point in the history
Fixes an error where we would return an `Unknown Error` when we actually
could determine the error.

This makes debugging SQL statements *much* easier.
  • Loading branch information
rschmukler committed Feb 13, 2024
1 parent d0f621b commit 64bc1d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tmducken/duckdb.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ _unnamed [5 3]:
stmt (Pointer. (long (stmt-ptr 0)))
_ (when-not (== 0 tval)
(let [errptr (duckdb-ffi/duckdb_prepare_error stmt)
errors (when errptr
errors (if errptr
(dt-ffi/c->string errptr)
"Unknown Error")]
@destroy-prep*
Expand Down

0 comments on commit 64bc1d2

Please sign in to comment.