summaryrefslogtreecommitdiff
path: root/src/assert.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/assert.cc')
-rw-r--r--src/assert.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/assert.cc b/src/assert.cc
index 40e9f6b3..0c4e85f3 100644
--- a/src/assert.cc
+++ b/src/assert.cc
@@ -13,4 +13,16 @@ String assert_failed::description() const
return m_message;
}
+void on_assert_failed(const String& message)
+{
+ int res = system(("xmessage -buttons 'quit:0,ignore:1' '" + message + "'").c_str());
+ switch (res)
+ {
+ case 0:
+ throw assert_failed(message);
+ case 1:
+ return;
+ }
+}
+
}