aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_client/httpc_handler.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-10-07 10:32:38 +0200
committerIngela Anderton Andin <[email protected]>2016-10-07 10:32:38 +0200
commit763971712d6c8fad295ecc42ea30c30b013dfd84 (patch)
tree09a0d74ce95b346250e4a2e0ea25e773817493e0 /lib/inets/src/http_client/httpc_handler.erl
parent118bf7a9612f5df366633726581803a1a157154c (diff)
parent303047140c0fcb3a0b01ecbffa3fe89dbbcd6806 (diff)
downloadotp-763971712d6c8fad295ecc42ea30c30b013dfd84.tar.gz
otp-763971712d6c8fad295ecc42ea30c30b013dfd84.tar.bz2
otp-763971712d6c8fad295ecc42ea30c30b013dfd84.zip
Merge branch 'ingela/inets/httpc/ERL-253' into maint
* ingela/inets/httpc/ERL-253: inets: httpc improve error handling
Diffstat (limited to 'lib/inets/src/http_client/httpc_handler.erl')
-rw-r--r--lib/inets/src/http_client/httpc_handler.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl
index e223292613..59cb1299e9 100644
--- a/lib/inets/src/http_client/httpc_handler.erl
+++ b/lib/inets/src/http_client/httpc_handler.erl
@@ -1846,10 +1846,13 @@ update_session(ProfileName, #session{id = SessionId} = Session, Pos, Value) ->
httpc_manager:update_session(ProfileName, SessionId, Pos, Value)
end
catch
- error:undef -> % This could happen during code upgrade
+ error:undef -> %% This could happen during code upgrade
Session2 = erlang:setelement(Pos, Session, Value),
insert_session(Session2, ProfileName);
- T:E ->
+ error:badarg ->
+ exit(normal); %% Manager has been shutdown
+ T:E ->
+ %% Unexpected this must be an error!
Stacktrace = erlang:get_stacktrace(),
error_logger:error_msg("Failed updating session: "
"~n ProfileName: ~p"