summaryrefslogtreecommitdiffstats
path: root/scene/main/http_request.cpp
diff options
context:
space:
mode:
authorTomasz Chabora <kobewi4e@gmail.com>2019-08-08 22:11:48 +0200
committerTomasz Chabora <kobewi4e@gmail.com>2019-08-09 13:54:52 +0200
commitaf5e0fff66d55d07a7910bcd7f170da2f952f7cb (patch)
treecdf217de6cd3ce1c038b7d159d06635a641105f2 /scene/main/http_request.cpp
parentd2a67c9c1fdee470064f2b3c5750c98f174b5399 (diff)
downloadredot-engine-af5e0fff66d55d07a7910bcd7f170da2f952f7cb.tar.gz
Remove ERR_EXPLAIN from scene/* code
Diffstat (limited to 'scene/main/http_request.cpp')
-rw-r--r--scene/main/http_request.cpp13
1 files changed, 3 insertions, 10 deletions
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<String> &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();