Skip to content

Commit 0ad945d

Browse files
committed
document handle_info/2
1 parent 625b89f commit 0ad945d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/db_connection.ex

+8
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,14 @@ defmodule DBConnection do
362362
"""
363363
@callback disconnect(err :: Exception.t(), state :: any) :: :ok
364364

365+
@doc """
366+
Optional callback for handling messages received by the connection.
367+
Returns `{:disconnect, exception}` to close the connection or `:ok` to continue.
368+
"""
369+
@callback handle_info(message :: any, state :: any) :: {:disconnect, Exception.t()} | :ok
370+
371+
@optional_callbacks handle_info: 2
372+
365373
@connection_module_key :connection_module
366374

367375
@doc """

0 commit comments

Comments
 (0)