aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2011-09-28 11:48:08 +0200
committerRaimo Niskanen <[email protected]>2011-11-17 15:42:14 +0100
commit4f8e3e94357cd4730c9e3135f2bafd9b6d4fd13e (patch)
tree408113a7211e7ca3a126af1dea09450475a550ca /lib/kernel
parent3be53d45e394dab127563d7a8d6da109cd9bc108 (diff)
downloadotp-4f8e3e94357cd4730c9e3135f2bafd9b6d4fd13e.tar.gz
otp-4f8e3e94357cd4730c9e3135f2bafd9b6d4fd13e.tar.bz2
otp-4f8e3e94357cd4730c9e3135f2bafd9b6d4fd13e.zip
erts,kernel: Return eprotonosupport when SCTP is not supported
It is better that gen_sctp:open/0-2 returns the informative Posix return code {error,eprotonosupport} than previously {error,badarg} when SCTP is not supported since it is so platform dependent.
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/test/gen_sctp_SUITE.erl11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/kernel/test/gen_sctp_SUITE.erl b/lib/kernel/test/gen_sctp_SUITE.erl
index 301f69ce09..d0b0bdf4d4 100644
--- a/lib/kernel/test/gen_sctp_SUITE.erl
+++ b/lib/kernel/test/gen_sctp_SUITE.erl
@@ -44,17 +44,12 @@ groups() ->
[].
init_per_suite(Config) ->
- try gen_sctp:open() of
+ case gen_sctp:open() of
{ok,Socket} ->
gen_sctp:close(Socket),
[];
- _ ->
- []
- catch
- error:badarg ->
- {skip,"SCTP not supported on this machine"};
- _:_ ->
- Config
+ {error,eprotonosupport} ->
+ {skip,"SCTP not supported on this machine"}
end.
end_per_suite(_Conifig) ->