aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test/httpd_time_test.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-11-28 12:42:25 +0100
committerMicael Karlberg <[email protected]>2011-11-28 12:42:25 +0100
commitee353c6eddf4396fa0fa054f7e8f80c72ae0b4f2 (patch)
treee3b5ac70784d1fb18d0475a30329ecc8e29e3cf6 /lib/inets/test/httpd_time_test.erl
parent191807cea0a8ac390f0d54e2a4b970f0de7548ae (diff)
downloadotp-ee353c6eddf4396fa0fa054f7e8f80c72ae0b4f2.tar.gz
otp-ee353c6eddf4396fa0fa054f7e8f80c72ae0b4f2.tar.bz2
otp-ee353c6eddf4396fa0fa054f7e8f80c72ae0b4f2.zip
Handle more possible results from parsing the response.
Diffstat (limited to 'lib/inets/test/httpd_time_test.erl')
-rw-r--r--lib/inets/test/httpd_time_test.erl10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/inets/test/httpd_time_test.erl b/lib/inets/test/httpd_time_test.erl
index c54674be36..39ea44fec7 100644
--- a/lib/inets/test/httpd_time_test.erl
+++ b/lib/inets/test/httpd_time_test.erl
@@ -377,7 +377,15 @@ validate(ExpStatusCode, SocketType, Socket, Response) ->
"Expected status code: ~p (~s)",
[StatusCode, status_to_message(StatusCode),
ExpStatusCode, status_to_message(ExpStatusCode)]),
- exit({unexpected_response_code, StatusCode, ExpStatusCode})
+ exit({unexpected_response_code, StatusCode, ExpStatusCode});
+ {ok, Unexpected} ->
+ error_msg("Unexpected response split: ~p (~s)",
+ [Unexpected, Response]),
+ exit({unexpected_response, Unexpected, Response});
+ {error, Reason} ->
+ error_msg("Failed processing response: ~p (~s)",
+ [Reason, Response]),
+ exit({failed_response_processing, Reason, Response})
end.