aboutsummaryrefslogtreecommitdiffstats
path: root/lib/eldap
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2012-03-28 11:04:58 +0200
committerDan Gudmundsson <[email protected]>2012-03-28 11:04:58 +0200
commit1ff967c2a574161aef4c88177da534b45d9ebd80 (patch)
treeafe4e50a977c7803feaf215b3928659212444394 /lib/eldap
parentc17aa8be39231eff30e899b4777596e193876650 (diff)
downloadotp-1ff967c2a574161aef4c88177da534b45d9ebd80.tar.gz
otp-1ff967c2a574161aef4c88177da534b45d9ebd80.tar.bz2
otp-1ff967c2a574161aef4c88177da534b45d9ebd80.zip
[eldap] Fix parse_port error handling
Dialyzer found that.
Diffstat (limited to 'lib/eldap')
-rw-r--r--lib/eldap/src/eldap.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/eldap/src/eldap.erl b/lib/eldap/src/eldap.erl
index 338ef19522..699dfc8791 100644
--- a/lib/eldap/src/eldap.erl
+++ b/lib/eldap/src/eldap.erl
@@ -1077,9 +1077,8 @@ parse_hostport(Str) ->
end.
parse_port(Rest,Sport) ->
- case list_to_integer(Sport) of
- Port when is_integer(Port) -> Port;
- _ -> parse_error(parsing_port,Rest)
+ try list_to_integer(Sport)
+ catch _:_ -> parse_error(parsing_port,Rest)
end.
parse_host(Rest,Shost) ->