@@ -130,7 +130,8 @@ change_code(Name, Module, OldVsn, Extra) ->
130130 Timeout :: timeout ()
131131) -> ok | {error , any ()}.
132132change_code (Name , Module , OldVsn , Extra , Timeout ) ->
133- gen :call (Name , system , {change_code , Module , OldVsn , Extra }, Timeout ).
133+ {ok , Reply } = gen :call (Name , system , {change_code , Module , OldVsn , Extra }, Timeout ),
134+ Reply .
134135
135136% % @equiv get_state(Name, 5000)
136137-spec get_state (Name :: name ()) -> any ().
@@ -147,7 +148,8 @@ get_state(Name) ->
147148% %-----------------------------------------------------------------------------
148149-spec get_state (Name :: name (), timeout ()) -> any ().
149150get_state (Name , Timeout ) ->
150- case gen :call (Name , system , get_state , Timeout ) of
151+ {ok , Reply } = gen :call (Name , system , get_state , Timeout ),
152+ case Reply of
151153 {ok , State } -> State ;
152154 {error , Reason } -> error (Reason )
153155 end .
@@ -168,7 +170,8 @@ get_status(Name) ->
168170-spec get_status (Name :: name (), Timeout :: timeout ()) ->
169171 {status , pid (), {module , module ()}, [SItem :: any ()]}.
170172get_status (Name , Timeout ) ->
171- gen :call (Name , system , get_status , Timeout ).
173+ {ok , Reply } = gen :call (Name , system , get_status , Timeout ),
174+ Reply .
172175
173176% % @equiv replace_state(Name, StateFun, 5000)
174177-spec replace_state (Name :: name (), StateFun :: fun ((any ()) -> any ())) -> ok .
@@ -185,7 +188,8 @@ replace_state(Name, StateFun) ->
185188% %-----------------------------------------------------------------------------
186189-spec replace_state (Name :: name (), StateFun :: fun ((any ()) -> any ()), Timeout :: timeout ()) -> ok .
187190replace_state (Name , StateFun , Timeout ) ->
188- case gen :call (Name , system , {replace_state , StateFun }, Timeout ) of
191+ {ok , Reply } = gen :call (Name , system , {replace_state , StateFun }, Timeout ),
192+ case Reply of
189193 {ok , State } -> State ;
190194 {error , Reason } -> error (Reason )
191195 end .
@@ -204,7 +208,8 @@ resume(Name) ->
204208% %-----------------------------------------------------------------------------
205209-spec resume (Name :: name (), Timeout :: timeout ()) -> ok .
206210resume (Name , Timeout ) ->
207- gen :call (Name , system , resume , Timeout ).
211+ {ok , ok } = gen :call (Name , system , resume , Timeout ),
212+ ok .
208213
209214% % @equiv suspend(Name, 5000)
210215-spec suspend (Name :: name ()) -> ok .
@@ -221,7 +226,8 @@ suspend(Name) ->
221226% %-----------------------------------------------------------------------------
222227-spec suspend (Name :: name (), Timeout :: timeout ()) -> ok .
223228suspend (Name , Timeout ) ->
224- gen :call (Name , system , suspend , Timeout ).
229+ {ok , ok } = gen :call (Name , system , suspend , Timeout ),
230+ ok .
225231
226232% % @equiv terminate(Name, Reason, 5000)
227233-spec terminate (Name :: name (), Reason :: any ()) -> ok .
@@ -238,7 +244,8 @@ terminate(Name, Reason) ->
238244% %-----------------------------------------------------------------------------
239245-spec terminate (Name :: name (), Reason :: any (), Timeout :: timeout ()) -> ok .
240246terminate (Name , Reason , Timeout ) ->
241- gen :call (Name , system , {terminate , Reason }, Timeout ).
247+ {ok , ok } = gen :call (Name , system , {terminate , Reason }, Timeout ),
248+ ok .
242249
243250% % @equiv trace(Name, Flag, 5000)
244251-spec trace (Name :: name (), Flag :: boolean ()) -> ok .
@@ -255,7 +262,8 @@ trace(Name, Flag) ->
255262% %-----------------------------------------------------------------------------
256263-spec trace (Name :: name (), Flag :: boolean (), Timeout :: timeout ()) -> ok .
257264trace (Name , Flag , Timeout ) ->
258- gen :call (Name , system , {debug , {trace , Flag }}, Timeout ).
265+ {ok , ok } = gen :call (Name , system , {debug , {trace , Flag }}, Timeout ),
266+ ok .
259267
260268% %-----------------------------------------------------------------------------
261269% % Process Implementation Functions
0 commit comments