Skip to content

Commit 2512738

Browse files
authored
Show pool mode in this error (#331)
With the current code, it's always :manual when this error is generated, but this is useful information if the user is attempting to use another mode.
1 parent d572b07 commit 2512738

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/db_connection/ownership/manager.ex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ defmodule DBConnection.Ownership.Manager do
223223
{:noreply, state}
224224

225225
:not_found when mode == :manual ->
226-
not_found(from)
226+
not_found(from, mode)
227227
{:noreply, state}
228228

229229
:not_found ->
@@ -393,9 +393,10 @@ defmodule DBConnection.Ownership.Manager do
393393
caller
394394
end
395395

396-
defp not_found({pid, _} = from) do
396+
defp not_found({pid, _} = from, mode) do
397397
msg = """
398-
cannot find ownership process for #{Util.inspect_pid(pid)}.
398+
cannot find ownership process for #{Util.inspect_pid(pid)}
399+
using mode #{inspect(mode)}.
399400
400401
When using ownership, you must manage connections in one
401402
of the four ways:

0 commit comments

Comments
 (0)