Skip to content

Commit

Permalink
fix: log failed db query with arguments (#166)
Browse files Browse the repository at this point in the history
Also switches it from an error to a warning
  • Loading branch information
mhanberg authored Aug 11, 2023
1 parent 2b83c33 commit c0d813d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/next_ls/db.ex
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,11 @@ defmodule NextLS.DB do

case Exqlite.Basic.exec(conn, query, args) do
{:error, %{message: message, statement: statement}, _} ->
NextLS.Logger.error(logger, """
NextLS.Logger.warning(logger, """
sqlite3 error: #{message}
statement: #{statement}
arguments: #{inspect(args)}
""")

{:error, message}
Expand Down

0 comments on commit c0d813d

Please sign in to comment.