From af5e0fff66d55d07a7910bcd7f170da2f952f7cb Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Thu, 8 Aug 2019 22:11:48 +0200 Subject: Remove ERR_EXPLAIN from scene/* code --- scene/main/http_request.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'scene/main/http_request.cpp') diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index 05bd911014..e21e47f8a8 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -60,14 +60,10 @@ Error HTTPRequest::_parse_url(const String &p_url) { use_ssl = true; port = 443; } else { - ERR_EXPLAIN("Malformed URL"); - ERR_FAIL_V(ERR_INVALID_PARAMETER); + ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "Malformed URL."); } - if (url.length() < 1) { - ERR_EXPLAIN("URL too short"); - ERR_FAIL_V(ERR_INVALID_PARAMETER); - } + ERR_FAIL_COND_V_MSG(url.length() < 1, ERR_INVALID_PARAMETER, "URL too short."); int slash_pos = url.find("/"); @@ -91,10 +87,7 @@ Error HTTPRequest::_parse_url(const String &p_url) { Error HTTPRequest::request(const String &p_url, const Vector &p_custom_headers, bool p_ssl_validate_domain, HTTPClient::Method p_method, const String &p_request_data) { ERR_FAIL_COND_V(!is_inside_tree(), ERR_UNCONFIGURED); - if (requesting) { - ERR_EXPLAIN("HTTPRequest is processing a request. Wait for completion or cancel it before attempting a new one."); - ERR_FAIL_V(ERR_BUSY); - } + ERR_FAIL_COND_V_MSG(requesting, ERR_BUSY, "HTTPRequest is processing a request. Wait for completion or cancel it before attempting a new one."); if (timeout > 0) { timer->stop(); -- cgit v1.2.3