@@ -127,7 +127,8 @@ defmodule ElixirScope.Foundation.Events do
127127 iex> ElixirScope.Foundation.Events.function_entry(MyModule, :my_func, 2, [arg1, arg2])
128128 {:ok, %Event{event_type: :function_entry, ...}}
129129 """
130- @ spec function_entry ( module ( ) , atom ( ) , arity ( ) , [ term ( ) ] , keyword ( ) ) :: { :ok , Event . t ( ) } | { :error , Error . t ( ) }
130+ @ spec function_entry ( module ( ) , atom ( ) , arity ( ) , [ term ( ) ] , keyword ( ) ) ::
131+ { :ok , Event . t ( ) } | { :error , Error . t ( ) }
131132 def function_entry ( module , function , arity , args , opts \\ [ ] ) do
132133 alias ElixirScope.Foundation.Logic.EventLogic
133134 EventLogic . create_function_entry ( module , function , arity , args , opts )
@@ -141,10 +142,20 @@ defmodule ElixirScope.Foundation.Events do
141142 iex> ElixirScope.Foundation.Events.function_exit(MyModule, :my_func, 2, 123, :ok, 1000, :normal)
142143 {:ok, %Event{event_type: :function_exit, ...}}
143144 """
144- @ spec function_exit ( module ( ) , atom ( ) , arity ( ) , pos_integer ( ) , term ( ) , non_neg_integer ( ) , atom ( ) ) :: { :ok , Event . t ( ) } | { :error , Error . t ( ) }
145+ @ spec function_exit ( module ( ) , atom ( ) , arity ( ) , pos_integer ( ) , term ( ) , non_neg_integer ( ) , atom ( ) ) ::
146+ { :ok , Event . t ( ) } | { :error , Error . t ( ) }
145147 def function_exit ( module , function , arity , call_id , result , duration_ns , exit_reason ) do
146148 alias ElixirScope.Foundation.Logic.EventLogic
147- EventLogic . create_function_exit ( module , function , arity , call_id , result , duration_ns , exit_reason )
149+
150+ EventLogic . create_function_exit (
151+ module ,
152+ function ,
153+ arity ,
154+ call_id ,
155+ result ,
156+ duration_ns ,
157+ exit_reason
158+ )
148159 end
149160
150161 @ doc """
@@ -155,7 +166,8 @@ defmodule ElixirScope.Foundation.Events do
155166 iex> ElixirScope.Foundation.Events.state_change(self(), :handle_call, old_state, new_state)
156167 {:ok, %Event{event_type: :state_change, ...}}
157168 """
158- @ spec state_change ( pid ( ) , atom ( ) , term ( ) , term ( ) , keyword ( ) ) :: { :ok , Event . t ( ) } | { :error , Error . t ( ) }
169+ @ spec state_change ( pid ( ) , atom ( ) , term ( ) , term ( ) , keyword ( ) ) ::
170+ { :ok , Event . t ( ) } | { :error , Error . t ( ) }
159171 def state_change ( server_pid , callback , old_state , new_state , opts \\ [ ] ) do
160172 alias ElixirScope.Foundation.Logic.EventLogic
161173 EventLogic . create_state_change ( server_pid , callback , old_state , new_state , opts )
@@ -288,6 +300,7 @@ defmodule ElixirScope.Foundation.Events do
288300 alias ElixirScope.Foundation.Logic.EventLogic
289301 chain = EventLogic . extract_correlation_chain ( events , correlation_id )
290302 { :ok , chain }
303+
291304 { :error , _ } = error ->
292305 error
293306 end
@@ -328,8 +341,6 @@ defmodule ElixirScope.Foundation.Events do
328341 end
329342end
330343
331-
332-
333344# defmodule ElixirScope.Foundation.Events do
334345# @moduledoc """
335346# Core event system for ElixirScope.
0 commit comments