aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2017-08-31 16:09:11 +0200
committerAnders Svensson <[email protected]>2017-08-31 16:21:52 +0200
commit3ec3cc239999cb59d1260b6c7790eb112d9da47c (patch)
tree9cdfd4934e1a5467810d5320285d2f694dfc9a75 /lib
parentb0582c6963f6dc203f05ed810c9446cf3fa0f0ae (diff)
downloadotp-3ec3cc239999cb59d1260b6c7790eb112d9da47c.tar.gz
otp-3ec3cc239999cb59d1260b6c7790eb112d9da47c.tar.bz2
otp-3ec3cc239999cb59d1260b6c7790eb112d9da47c.zip
Fix minor error-handling blunder
Leading to this admonition from dialyzer: diameter_config.erl:670: The variable No can never match since previous clauses completely covered the type 'ok' The throw was caught, but resulted in an error return without the intended information.
Diffstat (limited to 'lib')
-rw-r--r--lib/diameter/src/base/diameter_config.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/diameter/src/base/diameter_config.erl b/lib/diameter/src/base/diameter_config.erl
index 4721be1ca0..6fc4277ac8 100644
--- a/lib/diameter/src/base/diameter_config.erl
+++ b/lib/diameter/src/base/diameter_config.erl
@@ -665,9 +665,8 @@ opt(transport, {applications, As}) ->
is_list(As);
opt(transport, {capabilities, Os}) ->
- is_list(Os) andalso case encode_CER(Os) of
- ok -> true;
- No -> {error, No}
+ is_list(Os) andalso try ok = encode_CER(Os), true
+ catch ?FAILURE(No) -> {error, No}
end;
opt(_, {K, Tmo})