[vte] lib: Fix the build with debug disabled
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] lib: Fix the build with debug disabled
- Date: Wed, 27 May 2020 20:20:34 +0000 (UTC)
commit 44547bf2cdd6ac9a2dc6212bb633f41493122426
Author: Christian Persch <chpe src gnome org>
Date: Wed May 27 22:18:16 2020 +0200
lib: Fix the build with debug disabled
src/vtegtk.cc | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index cb315f1b..47998b69 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -5631,7 +5631,12 @@ try
}
auto msg = vte::glib::take_string(g_strdup_printf("Caught exception in %s [%s:%d]: %s",
- func, filename, line, what.c_str()));
+#ifdef VTE_DEBUG
+ func, filename, line,
+#else
+ "?", "?", "?",
+#endif
+ what.c_str()));
auto msg_str = vte::glib::take_string(g_utf8_make_valid(msg.get(), -1));
g_set_error_literal(error,
G_IO_ERROR,
@@ -5644,9 +5649,14 @@ try
catch (...)
{
vte::log_exception();
+#ifdef VTE_DEBUG
g_set_error(error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Caught exception while logging an exception in %s [%s:%d]\n",
func, filename, line);
+#else
+ g_set_error_literal(error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ "Caught exception while logging an exception");
+#endif
return false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]