[gjs: 14/18] function: Improve debug message
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 14/18] function: Improve debug message
- Date: Tue, 31 Dec 2019 23:16:11 +0000 (UTC)
commit c450db94af706718f7a8587b3776fa56637d8e4a
Author: Philip Chimento <philip chimento gmail com>
Date: Mon Dec 2 21:34:39 2019 -0800
function: Improve debug message
If a callback terminated with an uncatchable exception, then instead of
printing only the callback's type in the error message, also print its
display name, and also the namespace of its GI type.
gi/function.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gi/function.cpp b/gi/function.cpp
index bec2f9ed..49681ac3 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -436,7 +436,10 @@ out:
exit(code);
/* Some other uncatchable exception, e.g. out of memory */
- g_error("Function %s terminated with uncatchable exception",
+ JSFunction* fn = gjs_closure_get_callable(trampoline->js_function);
+ g_error("Function %s (%s.%s) terminated with uncatchable exception",
+ gjs_debug_string(JS_GetFunctionDisplayId(fn)).c_str(),
+ g_base_info_get_namespace(trampoline->info),
g_base_info_get_name(trampoline->info));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]