summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-11-17 13:25:58 +0000
committerMaxime Coste <frrrwww@gmail.com>2013-11-17 13:25:58 +0000
commitc764fa7e2560fa86b5d931126fdaea830c3e6914 (patch)
treeedae12a3341b9bec4c3206b1c3e507bb166753be /src
parentcb7ef23c442aba45929755694f6c07e4ab1b769b (diff)
write assert failed info to debug buffer
Diffstat (limited to 'src')
-rw-r--r--src/assert.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/assert.cc b/src/assert.cc
index b51815a5..c58d8165 100644
--- a/src/assert.cc
+++ b/src/assert.cc
@@ -1,6 +1,7 @@
#include "assert.hh"
#include "exception.hh"
+#include "debug.hh"
#include <sys/types.h>
#include <unistd.h>
@@ -21,6 +22,8 @@ private:
void on_assert_failed(const char* message)
{
String debug_info = "pid: " + to_string(getpid());
+ write_debug("assert failed: '"_str + message + "' " + debug_info);
+
int res = system(("xmessage -buttons 'quit:0,ignore:1' '"_str +
message + "\n[Debug Infos]\n" + debug_info + "'").c_str());
switch (res)