aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src
diff options
context:
space:
mode:
authorLuca Favatella <[email protected]>2018-04-05 15:02:43 +0100
committerLuca Favatella <[email protected]>2018-04-05 15:06:56 +0100
commit2f7731260c4624cd5a324cb7c6ea9c124cf9ea4a (patch)
tree32df41edf3c86cf3e20ca3864826ec48f6c74747 /lib/inets/src
parent9a19dc099198585bd4f019116663d5b8be506ce0 (diff)
downloadotp-2f7731260c4624cd5a324cb7c6ea9c124cf9ea4a.tar.gz
otp-2f7731260c4624cd5a324cb7c6ea9c124cf9ea4a.tar.bz2
otp-2f7731260c4624cd5a324cb7c6ea9c124cf9ea4a.zip
inets: Avoid `erlang:get_stacktrace/0` deprecated in OTP 21
Diffstat (limited to 'lib/inets/src')
-rw-r--r--lib/inets/src/http_client/httpc_handler.erl12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl
index ca29523f84..945b1b94b6 100644
--- a/lib/inets/src/http_client/httpc_handler.erl
+++ b/lib/inets/src/http_client/httpc_handler.erl
@@ -253,8 +253,7 @@ handle_call(Request, From, State) ->
Result ->
Result
catch
- Class:Reason ->
- ST = erlang:get_stacktrace(),
+ Class:Reason:ST ->
{stop, {shutdown, {{Class, Reason}, ST}}, State}
end.
@@ -270,8 +269,7 @@ handle_cast(Msg, State) ->
Result ->
Result
catch
- Class:Reason ->
- ST = erlang:get_stacktrace(),
+ Class:Reason:ST ->
{stop, {shutdown, {{Class, Reason}, ST}}, State}
end.
@@ -286,8 +284,7 @@ handle_info(Info, State) ->
Result ->
Result
catch
- Class:Reason ->
- ST = erlang:get_stacktrace(),
+ Class:Reason:ST ->
{stop, {shutdown, {{Class, Reason}, ST}}, State}
end.
@@ -572,8 +569,7 @@ do_handle_info({Proto, _Socket, Data},
activate_once(Session),
{noreply, State#state{mfa = NewMFA}}
catch
- Class:Reason ->
- ST = erlang:get_stacktrace(),
+ Class:Reason:ST ->
ClientReason = {could_not_parse_as_http, Data},
ClientErrMsg = httpc_response:error(Request, ClientReason),
NewState = answer_request(Request, ClientErrMsg, State),