aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_manager.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2010-05-21 14:39:40 +0000
committerErlang/OTP <[email protected]>2010-05-21 14:39:40 +0000
commit58532d2bda5628a44586ae5f38d533c4318c9c8d (patch)
treea36ee0c09e892c3c299b29eb3d52df971bf78731 /lib/ssl/src/ssl_manager.erl
parentcb2fced5a477e7b75e1d002542bb36a43b1f6071 (diff)
downloadotp-58532d2bda5628a44586ae5f38d533c4318c9c8d.tar.gz
otp-58532d2bda5628a44586ae5f38d533c4318c9c8d.tar.bz2
otp-58532d2bda5628a44586ae5f38d533c4318c9c8d.zip
Clean up of code
Diffstat (limited to 'lib/ssl/src/ssl_manager.erl')
-rw-r--r--lib/ssl/src/ssl_manager.erl16
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/ssl/src/ssl_manager.erl b/lib/ssl/src/ssl_manager.erl
index 539ddd936a..8b5d9221bc 100644
--- a/lib/ssl/src/ssl_manager.erl
+++ b/lib/ssl/src/ssl_manager.erl
@@ -179,10 +179,8 @@ handle_call({{connection_init, TrustedcertsFile, _Role}, Pid}, _From,
{ok, Ref} = ssl_certificate_db:add_trusted_certs(Pid, TrustedcertsFile, Db),
{ok, Ref, Cache}
catch
- _:{badmatch, Error} ->
- {error, Error};
- _E:_R ->
- {error, {_R,erlang:get_stacktrace()}}
+ _:Reason ->
+ {error, Reason}
end,
{reply, Result, State};
@@ -204,14 +202,10 @@ handle_call({{cache_pem, File},Pid}, _, State = #state{certificate_db = Db}) ->
try ssl_certificate_db:cache_pem_file(Pid,File,Db) of
Result ->
{reply, Result, State}
- catch _:{badmatch, Reason} ->
- {reply, Reason, State};
- _:Reason ->
+ catch
+ _:Reason ->
{reply, {error, Reason}, State}
- end;
-
-handle_call(_,_, State) ->
- {reply, ok, State}.
+ end.
%%--------------------------------------------------------------------
%% Function: handle_cast(Msg, State) -> {noreply, State} |
%% {noreply, State, Timeout} |