[vte] lib: Improve exception error message without debug enabled



commit 87506bfe60b2fb91e2cd0741e7baf3473e5e71bc
Author: Christian Persch <chpe src gnome org>
Date:   Wed May 27 22:43:29 2020 +0200

    lib: Improve exception error message without debug enabled

 src/vtegtk.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index 47998b69..443f9479 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -5630,13 +5630,14 @@ try
                 what = "Unknown exception"sv;
         }
 
-        auto msg = vte::glib::take_string(g_strdup_printf("Caught exception in %s [%s:%d]: %s",
 #ifdef VTE_DEBUG
+        auto msg = vte::glib::take_string(g_strdup_printf("Caught exception in %s [%s:%d]: %s",
                                                           func, filename, line,
+                                                          what.c_str()));
 #else
-                                                          "?", "?", "?",
-#endif
+        auto msg = vte::glib::take_string(g_strdup_printf("Caught exception: %s",
                                                           what.c_str()));
+#endif
         auto msg_str = vte::glib::take_string(g_utf8_make_valid(msg.get(), -1));
         g_set_error_literal(error,
                             G_IO_ERROR,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]