diff options
author | Siri Hansen <[email protected]> | 2011-11-29 11:58:23 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2011-11-30 10:38:01 +0100 |
commit | 466b964d3cd5cd599d1f9513f3b1a77156ad6578 (patch) | |
tree | 5d9e33368682dc2caae02feeb1b7ee0c60cada03 /lib/stdlib/src | |
parent | 2b36dd726551cf822041b065df5d753ed0dba8b1 (diff) | |
download | otp-466b964d3cd5cd599d1f9513f3b1a77156ad6578.tar.gz otp-466b964d3cd5cd599d1f9513f3b1a77156ad6578.tar.bz2 otp-466b964d3cd5cd599d1f9513f3b1a77156ad6578.zip |
Fix dialyzer warning about gen_event callback init/1 in log_mf_h
The warning is about log_mf_h having a different spec for gen_event
callback init/1 than defined in gen_event.erl. log_mf_h allows return
value {error,Reason}, while gen_even only specifies successful return
values.
This commit add {error,Reason} as a valid return value to the
gen_event callback, since this is handled by the code.
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r-- | lib/stdlib/src/gen_event.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/stdlib/src/gen_event.erl b/lib/stdlib/src/gen_event.erl index 9879b76391..3317b30e5c 100644 --- a/lib/stdlib/src/gen_event.erl +++ b/lib/stdlib/src/gen_event.erl @@ -70,7 +70,8 @@ -callback init(InitArgs :: term()) -> {ok, State :: term()} | - {ok, State :: term(), hibernate}. + {ok, State :: term(), hibernate} | + {error, Reason :: term()}. -callback handle_event(Event :: term(), State :: term()) -> {ok, NewState :: term()} | {ok, NewState :: term(), hibernate} | |