aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2013-09-11 15:58:51 +0200
committerIngela Anderton Andin <[email protected]>2014-02-05 10:32:24 +0100
commitdf096a3f447080d74d831cee795d456da8a569c4 (patch)
tree0d3f4e6853bef49d61ae19254986959a8a0db8b0
parentdfb5449c3a3ac2dee8b71434cba0afdba29a6567 (diff)
downloadotp-df096a3f447080d74d831cee795d456da8a569c4.tar.gz
otp-df096a3f447080d74d831cee795d456da8a569c4.tar.bz2
otp-df096a3f447080d74d831cee795d456da8a569c4.zip
httpc: Enhanched error handling
-rw-r--r--lib/inets/src/http_client/httpc_handler.erl11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl
index 1b5ac46408..d15d93676e 100644
--- a/lib/inets/src/http_client/httpc_handler.erl
+++ b/lib/inets/src/http_client/httpc_handler.erl
@@ -483,19 +483,12 @@ handle_info({Proto, _Socket, Data},
activate_once(Session),
{noreply, State#state{mfa = NewMFA}}
catch
- exit:_Exit ->
- ?hcrd("data processing exit", [{exit, _Exit}]),
- ClientReason = {could_not_parse_as_http, Data},
- ClientErrMsg = httpc_response:error(Request, ClientReason),
- NewState = answer_request(Request, ClientErrMsg, State),
- {stop, normal, NewState};
- error:_Error ->
- ?hcrd("data processing error", [{error, _Error}]),
+ _:_Reason ->
+ ?hcrd("data processing exit", [{exit, _Reason}]),
ClientReason = {could_not_parse_as_http, Data},
ClientErrMsg = httpc_response:error(Request, ClientReason),
NewState = answer_request(Request, ClientErrMsg, State),
{stop, normal, NewState}
-
end,
?hcri("data processed", [{final_result, FinalResult}]),
FinalResult;