diff options
author | Raimo Niskanen <[email protected]> | 2016-02-23 17:58:45 +0100 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2016-02-23 17:58:45 +0100 |
commit | 2b3a82ae44b222ce1146badcff972abb539d40ca (patch) | |
tree | 71031b280cf634bc11a7c95385a695fedaa0a1ac /lib/stdlib/test/gen_statem_SUITE.erl | |
parent | 793fe40e3883bca7c37b71fb59616a4ec8d379b1 (diff) | |
download | otp-2b3a82ae44b222ce1146badcff972abb539d40ca.tar.gz otp-2b3a82ae44b222ce1146badcff972abb539d40ca.tar.bz2 otp-2b3a82ae44b222ce1146badcff972abb539d40ca.zip |
Add {stop_and_reply,Reason,Replies [,Data])
Cleanup some error handling
Diffstat (limited to 'lib/stdlib/test/gen_statem_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/gen_statem_SUITE.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/stdlib/test/gen_statem_SUITE.erl b/lib/stdlib/test/gen_statem_SUITE.erl index a8b4d16f23..81182eff71 100644 --- a/lib/stdlib/test/gen_statem_SUITE.erl +++ b/lib/stdlib/test/gen_statem_SUITE.erl @@ -589,7 +589,7 @@ error_format_status(Config) when is_list(Config) -> "** State machine"++_, [Pid,{{call,_},badreturn}, {formatted,idle,Data}, - exit,{bad_return_value,badreturn}|_]}} -> + error,{bad_return_value,badreturn}|_]}} -> ok; Other when is_tuple(Other), element(1, Other) =:= error -> error_logger_forwarder:unregister(), @@ -1268,7 +1268,7 @@ connected(Type, Content, PrevState, State, Data) -> end. state0({call,From}, stop, _, _, Data) -> - {stop,normal,[{reply,From,stopped}],Data}; + {stop_and_reply,normal,[{reply,From,stopped}],Data}; state0(Type, Content, PrevState, State, Data) -> case handle_common_events(Type, Content, PrevState, State, Data) of undefined -> @@ -1332,11 +1332,11 @@ handle_common_events(cast, {get,Pid}, _, State, Data) -> Pid ! {state,State,Data}, {next_state,State,Data}; handle_common_events({call,From}, stop, _, _, Data) -> - {stop,normal,[{reply,From,stopped}],Data}; + {stop_and_reply,normal,[{reply,From,stopped}],Data}; handle_common_events(cast, stop, _, _, _) -> {stop,normal}; handle_common_events({call,From}, {stop,Reason}, _, _, Data) -> - {stop,Reason,{reply,From,stopped},Data}; + {stop_and_reply,Reason,{reply,From,stopped},Data}; handle_common_events(cast, {stop,Reason}, _, _, _) -> {stop,Reason}; handle_common_events({call,From}, 'alive?', _, State, Data) -> |