diff options
author | Raimo Niskanen <[email protected]> | 2016-07-19 14:46:43 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2016-07-19 14:46:43 +0200 |
commit | 9cdf92fc35006d34d7029ef0fc34c0daf9e1330b (patch) | |
tree | 932ac6498e9d30138284be3a464316dc0bf4b35e /lib/stdlib/doc/src/gen_statem.xml | |
parent | 01a46375d8aae78d4ad01c043b554e58c5b40768 (diff) | |
parent | 7c10598da79e28c9b802029d94269cbebba2f21e (diff) | |
download | otp-9cdf92fc35006d34d7029ef0fc34c0daf9e1330b.tar.gz otp-9cdf92fc35006d34d7029ef0fc34c0daf9e1330b.tar.bz2 otp-9cdf92fc35006d34d7029ef0fc34c0daf9e1330b.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/stdlib/doc/src/gen_statem.xml')
-rw-r--r-- | lib/stdlib/doc/src/gen_statem.xml | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/stdlib/doc/src/gen_statem.xml b/lib/stdlib/doc/src/gen_statem.xml index c57a31fa21..ed44eef912 100644 --- a/lib/stdlib/doc/src/gen_statem.xml +++ b/lib/stdlib/doc/src/gen_statem.xml @@ -1262,9 +1262,9 @@ handle_event(_, _, State, Data) -> <v> Vsn = term()</v> <v>OldState = NewState = term()</v> <v>Extra = term()</v> - <v>Result = {NewCallbackMode,NewState,NewData} | Reason</v> + <v>Result = {CallbackMode,NewState,NewData} | Reason</v> <v> - NewCallbackMode = + CallbackMode = <seealso marker="#type-callback_mode">callback_mode()</seealso> </v> <v> @@ -1321,11 +1321,19 @@ handle_event(_, _, State, Data) -> <p> If successful, the function must return the updated internal state in an - <c>{NewCallbackMode,NewState,NewData}</c> tuple. + <c>{CallbackMode,NewState,NewData}</c> tuple. </p> <p> - If the function returns <c>Reason</c>, the ongoing - upgrade fails and rolls back to the old release.</p> + If the function returns a failure <c>Reason</c>, the ongoing + upgrade fails and rolls back to the old release. + Note that <c>Reason</c> can not be a 3-tuple since that + will be regarded as a + <c>{CallbackMode,NewState,NewData}</c> tuple, + and that a tuple matching <c>{ok,_}</c> + is an invalid failure <c>Reason</c>. + It is recommended to use an atom as <c>Reason</c> since + it will be wrapped in an <c>{error,Reason}</c> tuple. + </p> <p> This function can use <seealso marker="erts:erlang#throw/1"><c>erlang:throw/1</c></seealso> |