From e0d494ccd7ede8ea5632efd461d4fb16e0fe317c Mon Sep 17 00:00:00 2001 From: Simon Etter Date: Thu, 8 Feb 2024 13:35:00 +0800 Subject: [PATCH] fix(*): Replace logerror(ex, ...) with logerror() --- src/container.jl | 22 +++++++++++----------- src/fsm.jl | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/container.jl b/src/container.jl index 9552f67..d9fe873 100644 --- a/src/container.jl +++ b/src/container.jl @@ -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) @@ -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 @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) diff --git a/src/fsm.jl b/src/fsm.jl index 5b8b056..42ac695 100644 --- a/src/fsm.jl +++ b/src/fsm.jl @@ -214,7 +214,7 @@ 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 @@ -222,7 +222,7 @@ function action(b::FSMBehavior) 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