mirror of
https://github.com/godotengine/godot.git
synced 2025-10-24 10:23:28 +00:00
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
This commit is contained in:
parent
73cf0fd305
commit
71c03883b5
3 changed files with 6 additions and 6 deletions
|
|
@ -69,7 +69,7 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) {
|
|||
eval_ret = eval(UTF8ToString(CODE));
|
||||
}
|
||||
} catch (e) {
|
||||
Module.printErr(e);
|
||||
console.warn(e);
|
||||
eval_ret = null;
|
||||
}
|
||||
|
||||
|
|
@ -97,7 +97,7 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) {
|
|||
if (array_ptr!==0) {
|
||||
_free(array_ptr)
|
||||
}
|
||||
Module.printErr(e);
|
||||
console.warn(e);
|
||||
// fall through
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue