Skip to content

Commit

Permalink
fix(*): Replace logerror(ex, ...) with logerror()
Browse files Browse the repository at this point in the history
  • Loading branch information
ettersi committed Feb 8, 2024
1 parent 3603af5 commit e0d494c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions src/container.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,7 @@ function action(b::OneShotBehavior)
b.action === nothing || _mutex_call(b.action, b.agent, b)
b.onend === nothing || _mutex_call(b.onend, b.agent, b)
catch ex
reconnect(container(b.agent), ex) || logerror(ex, b.agent)
reconnect(container(b.agent), ex) || logerror(b.agent)
end
b.done = true
delete!(b.agent._behaviors, b)
Expand Down Expand Up @@ -1506,7 +1506,7 @@ function action(b::CyclicBehavior)
try
b.action === nothing || _mutex_call(b.action, b.agent, b)
catch ex
reconnect(container(b.agent), ex) || logerror(ex, b.agent)
reconnect(container(b.agent), ex) || logerror(b.agent)
end
yield()
else
Expand All @@ -1515,7 +1515,7 @@ function action(b::CyclicBehavior)
end
b.onend === nothing || _mutex_call(b.onend, b.agent, b)
catch ex
reconnect(container(b.agent), ex) || logerror(ex, b.agent)
reconnect(container(b.agent), ex) || logerror(b.agent)
end
b.done = true
delete!(b.agent._behaviors, b)
Expand Down Expand Up @@ -1604,7 +1604,7 @@ function action(b::WakerBehavior)
end
b.onend === nothing || _mutex_call(b.onend, b.agent, b)
catch ex
reconnect(container(b.agent), ex) || logerror(ex, b.agent)
reconnect(container(b.agent), ex) || logerror(b.agent)
end
b.done = true
delete!(b.agent._behaviors, b)
Expand Down Expand Up @@ -1676,12 +1676,12 @@ function action(b::TickerBehavior)
try
b.done || b.action === nothing || _mutex_call(b.action, b.agent, b)
catch ex
reconnect(container(b.agent), ex) || logerror(ex, b.agent)
reconnect(container(b.agent), ex) || logerror(b.agent)
end
end
b.onend === nothing || _mutex_call(b.onend, b.agent, b)
catch ex
reconnect(container(b.agent), ex) || logerror(ex, b.agent)
reconnect(container(b.agent), ex) || logerror(b.agent)
end
b.done = true
delete!(b.agent._behaviors, b)
Expand Down Expand Up @@ -1743,12 +1743,12 @@ function action(b::PoissonBehavior)
try
b.done || b.action === nothing || _mutex_call(b.action, b.agent, b)
catch ex
reconnect(container(b.agent), ex) || logerror(ex, b.agent)
reconnect(container(b.agent), ex) || logerror(b.agent)
end
end
b.onend === nothing || _mutex_call(b.onend, b.agent, b)
catch ex
reconnect(container(b.agent), ex) || logerror(ex, b.agent)
reconnect(container(b.agent), ex) || logerror(b.agent)
end
b.done = true
delete!(b.agent._behaviors, b)
Expand Down Expand Up @@ -1824,12 +1824,12 @@ function action(b::MessageBehavior)
msg = take!(ch)
msg === nothing || b.action === nothing || _mutex_call(b.action, b.agent, b, msg)
catch ex
reconnect(container(b.agent), ex) || logerror(ex, b.agent)
reconnect(container(b.agent), ex) || logerror(b.agent)
end
end
b.onend === nothing || _mutex_call(b.onend, b.agent, b)
catch ex
reconnect(container(b.agent), ex) || logerror(ex, b.agent)
reconnect(container(b.agent), ex) || logerror(b.agent)
finally
_dont_listen(b.agent, ch)
close(ch)
Expand Down Expand Up @@ -2066,7 +2066,7 @@ function _paramreq_action(a::Agent, b::MessageBehavior, msg::ParameterReq)
end
end
catch ex
reconnect(container(a), ex) || logerror(ex, a)
reconnect(container(a), ex) || logerror(a)
end
end
rmsg = ParameterRsp(performative=Performative.INFORM, inReplyTo=msg.messageID, recipient=msg.sender, readonly=ro, index=ndx)
Expand Down
4 changes: 2 additions & 2 deletions src/fsm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,15 @@ function action(b::FSMBehavior)
_mutex_call(onenter, b.agent, b, b.state)
end
catch ex
reconnect(container(b.agent), ex) || logerror(ex, b.agent)
reconnect(container(b.agent), ex) || logerror(b.agent)
end
yield()
else
lock(() -> wait(b.block), b.block)
end
end
catch ex
reconnect(container(b.agent), ex) || logerror(ex, b.agent)
reconnect(container(b.agent), ex) || logerror(b.agent)
end
delete!(b.agent._behaviors, b)
b.agent = nothing
Expand Down

0 comments on commit e0d494c

Please sign in to comment.