diff options
author | Alon Zakai (kripken) <alonzakai@gmail.com> | 2018-08-11 09:49:19 -0700 |
---|---|---|
committer | Alon Zakai (kripken) <alonzakai@gmail.com> | 2018-08-11 09:49:19 -0700 |
commit | 71c03883b50b98441ce457fb3cec1701a2e11842 (patch) | |
tree | ffcde4e42ede20ce2c7120bc3892793d34bdc7e0 /platform/javascript/http_request.js | |
parent | 73cf0fd30524a6acc4400ef069210d90eaba29a2 (diff) | |
download | redot-engine-71c03883b50b98441ce457fb3cec1701a2e11842.tar.gz |
use console.warn instead of Module.printErr: emscripten no longer exports printErr by default, and instead err() should be used in code seen by the optimizer; however, as Godot only runs on the Web (and not in node.js or elsewhere), using console.warn directly is good enough, and will work in all versions if emscripten
Diffstat (limited to 'platform/javascript/http_request.js')
-rw-r--r-- | platform/javascript/http_request.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/javascript/http_request.js b/platform/javascript/http_request.js index c420052e54..ee1c06c623 100644 --- a/platform/javascript/http_request.js +++ b/platform/javascript/http_request.js @@ -82,7 +82,7 @@ var GodotHTTPRequest = { godot_xhr_send_string: function(xhrId, strPtr) { if (!strPtr) { - Module.printErr("Failed to send string per XHR: null pointer"); + console.warn("Failed to send string per XHR: null pointer"); return; } GodotHTTPRequest.requests[xhrId].send(UTF8ToString(strPtr)); @@ -90,11 +90,11 @@ var GodotHTTPRequest = { godot_xhr_send_data: function(xhrId, ptr, len) { if (!ptr) { - Module.printErr("Failed to send data per XHR: null pointer"); + console.warn("Failed to send data per XHR: null pointer"); return; } if (len < 0) { - Module.printErr("Failed to send data per XHR: buffer length less than 0"); + console.warn("Failed to send data per XHR: buffer length less than 0"); return; } GodotHTTPRequest.requests[xhrId].send(HEAPU8.subarray(ptr, ptr + len)); |