aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/io.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-03-13 10:00:21 +0100
committerHans Bolinder <[email protected]>2014-03-20 16:00:26 +0100
commit69acde6d5415c770e22dafdfdf92608193151111 (patch)
treef23f0a11d33ed3638f154333b9bb0163bc38e6f9 /lib/stdlib/src/io.erl
parentce20094582493203c8812cd003e3d3b080f88607 (diff)
downloadotp-69acde6d5415c770e22dafdfdf92608193151111.tar.gz
otp-69acde6d5415c770e22dafdfdf92608193151111.tar.bz2
otp-69acde6d5415c770e22dafdfdf92608193151111.zip
Correct the contract of io:getopts()
Diffstat (limited to 'lib/stdlib/src/io.erl')
-rw-r--r--lib/stdlib/src/io.erl10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/stdlib/src/io.erl b/lib/stdlib/src/io.erl
index b11d41e2eb..27e2a82b41 100644
--- a/lib/stdlib/src/io.erl
+++ b/lib/stdlib/src/io.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -177,13 +177,15 @@ get_password(Io) ->
| {'expand_fun', expand_fun()}
| {'encoding', encoding()}.
--spec getopts() -> [opt_pair()].
+-spec getopts() -> [opt_pair()] | {'error', Reason} when
+ Reason :: term().
getopts() ->
getopts(default_input()).
--spec getopts(IoDevice) -> [opt_pair()] when
- IoDevice :: device().
+-spec getopts(IoDevice) -> [opt_pair()] | {'error', Reason} when
+ IoDevice :: device(),
+ Reason :: term().
getopts(Io) ->
request(Io, getopts).