diff options
author | Thaddeus Crews <repiteo@outlook.com> | 2024-10-31 20:14:36 -0500 |
---|---|---|
committer | Thaddeus Crews <repiteo@outlook.com> | 2024-10-31 20:14:36 -0500 |
commit | 163bf94d04342ad8d16086e95ea855a86d3699fc (patch) | |
tree | 6cdd9ec78a0db516c8516af7b0842b5efe426ae3 /core/io/http_client.cpp | |
parent | 6ca36277abcfd587c8a61193f278899ec2bc5d32 (diff) | |
parent | 38f9769bc6d560373df961880f99aaaafaae00d9 (diff) | |
download | redot-engine-163bf94d04342ad8d16086e95ea855a86d3699fc.tar.gz |
Merge pull request #98091 from AThousandShips/improve_err_prints_core
[Core] Improve error messages with `vformat`
Diffstat (limited to 'core/io/http_client.cpp')
-rw-r--r-- | core/io/http_client.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp index fc91341bed..9e426c4908 100644 --- a/core/io/http_client.cpp +++ b/core/io/http_client.cpp @@ -100,9 +100,9 @@ String HTTPClient::query_string_from_dict(const Dictionary &p_dict) { Error HTTPClient::verify_headers(const Vector<String> &p_headers) { for (int i = 0; i < p_headers.size(); i++) { String sanitized = p_headers[i].strip_edges(); - ERR_FAIL_COND_V_MSG(sanitized.is_empty(), ERR_INVALID_PARAMETER, "Invalid HTTP header at index " + itos(i) + ": empty."); + ERR_FAIL_COND_V_MSG(sanitized.is_empty(), ERR_INVALID_PARAMETER, vformat("Invalid HTTP header at index %d: empty.", i)); ERR_FAIL_COND_V_MSG(sanitized.find(":") < 1, ERR_INVALID_PARAMETER, - "Invalid HTTP header at index " + itos(i) + ": String must contain header-value pair, delimited by ':', but was: " + p_headers[i]); + vformat("Invalid HTTP header at index %d: String must contain header-value pair, delimited by ':', but was: '%s'.", i, p_headers[i])); } return OK; |