未验证 提交 026b71db 编写于 作者: A Ankit Jain 提交者: GitHub

[wasm] Use `g_printerr` to emit errors in mini-wasm.c, so they show up wit… (#49838)

* [wasm] Use g_error to emit errors in mini-wasm.c, so they show up with traces in js console

* address review feedback

vargaz: printf in JIT code is mapped to the platform logging operation, so this one can stay as it is.

* Use g_printerr instead of g_error, as suggested by feedback
上级 08d282c2
......@@ -567,13 +567,13 @@ mono_set_timeout_exec (int id)
//YES we swallow exceptions cuz there's nothing much we can do from here.
//FIXME Maybe call the unhandled exception function?
if (!is_ok (error)) {
printf ("timeout callback failed due to %s\n", mono_error_get_message (error));
g_printerr ("timeout callback failed due to %s\n", mono_error_get_message (error));
mono_error_cleanup (error);
}
if (exc) {
char *type_name = mono_type_get_full_name (mono_object_class (exc));
printf ("timeout callback threw a %s\n", type_name);
g_printerr ("timeout callback threw a %s\n", type_name);
g_free (type_name);
}
}
......@@ -605,13 +605,13 @@ tp_cb (void)
mono_runtime_try_invoke (method, NULL, NULL, &exc, error);
if (!is_ok (error)) {
printf ("ThreadPool Callback failed due to error: %s\n", mono_error_get_message (error));
g_printerr ("ThreadPool Callback failed due to error: %s\n", mono_error_get_message (error));
mono_error_cleanup (error);
}
if (exc) {
char *type_name = mono_type_get_full_name (mono_object_class (exc));
printf ("ThreadPool Callback threw an unhandled exception of type %s\n", type_name);
g_printerr ("ThreadPool Callback threw an unhandled exception of type %s\n", type_name);
g_free (type_name);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册