aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src
diff options
context:
space:
mode:
authorKirilll Zaborsky <[email protected]>2014-04-14 10:09:51 +0400
committerKirilll Zaborsky <[email protected]>2014-10-10 14:53:46 +0400
commit24a899be30578f59cdd73a70bdb775c18e6b4bd7 (patch)
tree238e57c73aff4c9f37e0709340c259f1d17d3afd /lib/inets/src
parentc9a57994e917d2aa21016915a542f920142f3d41 (diff)
downloadotp-24a899be30578f59cdd73a70bdb775c18e6b4bd7.tar.gz
otp-24a899be30578f59cdd73a70bdb775c18e6b4bd7.tar.bz2
otp-24a899be30578f59cdd73a70bdb775c18e6b4bd7.zip
inets: Return correct stacktrace on session updating failure
Debug output in httpc_handler:update_session/4 error handling code should not pollute stack trace returned in process exit.
Diffstat (limited to 'lib/inets/src')
-rw-r--r--lib/inets/src/http_client/httpc_handler.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl
index d152d9f0be..97297065ea 100644
--- a/lib/inets/src/http_client/httpc_handler.erl
+++ b/lib/inets/src/http_client/httpc_handler.erl
@@ -1850,6 +1850,7 @@ update_session(ProfileName, #session{id = SessionId} = Session, Pos, Value) ->
Session2 = erlang:setelement(Pos, Session, Value),
insert_session(Session2, ProfileName);
T:E ->
+ Stacktrace = erlang:get_stacktrace(),
error_logger:error_msg("Failed updating session: "
"~n ProfileName: ~p"
"~n SessionId: ~p"
@@ -1873,7 +1874,7 @@ update_session(ProfileName, #session{id = SessionId} = Session, Pos, Value) ->
{value, Value},
{etype, T},
{error, E},
- {stacktrace, erlang:get_stacktrace()}]})
+ {stacktrace, Stacktrace}]})
end.