aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/gen_server.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2011-11-29 15:37:11 +0100
committerSiri Hansen <[email protected]>2011-11-29 17:04:41 +0100
commit038b9dd3a1f9bdd86cbb83bf3484ab1529d4fca2 (patch)
tree9b3e5eaf6152dd673e966a9e4c30cc6506361879 /lib/stdlib/src/gen_server.erl
parent2b36dd726551cf822041b065df5d753ed0dba8b1 (diff)
downloadotp-038b9dd3a1f9bdd86cbb83bf3484ab1529d4fca2.tar.gz
otp-038b9dd3a1f9bdd86cbb83bf3484ab1529d4fca2.tar.bz2
otp-038b9dd3a1f9bdd86cbb83bf3484ab1529d4fca2.zip
Fix dialyzer warnings in supervisor
Dialyzer complained over a mismatch between the callback spec of Mod:code_change in gen_server and the spec of supervisor:code_change (which is the implementation of a gen_server Mod:code_change). This commit changes the callback spec to allow {error,Reason} as return value. Also, release_handler is updated to handle this return value.
Diffstat (limited to 'lib/stdlib/src/gen_server.erl')
-rw-r--r--lib/stdlib/src/gen_server.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/stdlib/src/gen_server.erl b/lib/stdlib/src/gen_server.erl
index 6f075bbe5a..af07bc988a 100644
--- a/lib/stdlib/src/gen_server.erl
+++ b/lib/stdlib/src/gen_server.erl
@@ -134,7 +134,7 @@
term().
-callback code_change(OldVsn :: (term() | {down, term()}), State :: term(),
Extra :: term()) ->
- {ok, NewState :: term()}.
+ {ok, NewState :: term()} | {error, Reason :: term()}.
%%% -----------------------------------------------------------------
%%% Starts a generic server.