- further edits to crashcatcher

Wed, 21 May 2014 19:00:57 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Wed, 21 May 2014 19:00:57 +0300
changeset 779
23130cafe95e
parent 778
0ed96169b8c0
child 780
b0d84fb70ea5

- further edits to crashcatcher

src/crashCatcher.cc file | annotate | diff | comparison | revisions
src/crashCatcher.h file | annotate | diff | comparison | revisions
--- a/src/crashCatcher.cc	Wed May 21 18:39:03 2014 +0300
+++ b/src/crashCatcher.cc	Wed May 21 19:00:57 2014 +0300
@@ -23,8 +23,6 @@
 #include <unistd.h>
 #include <signal.h>
 #include "crashCatcher.h"
-#include "basics.h"
-#include "dialogs.h"
 
 #ifdef Q_OS_LINUX
 # include <sys/prctl.h>
@@ -152,17 +150,15 @@
 //
 void assertionFailure (const char* file, int line, const char* funcname, const char* expr)
 {
-	String errmsg = format (
+#ifdef __unix__
+	g_assertionFailure = format ("%1:%2: %3: %4", file, line, funcname, expr);
+#else
+	bombBox (format (
 		"<p><b>File</b>: <tt>%1</tt><br />"
 		"<b>Line</b>: <tt>%2</tt><br />"
 		"<b>Function:</b> <tt>%3</tt></p>"
 		"<p>Assertion <b><tt>`%4'</tt></b> failed.</p>",
-		file, line, funcname, expr);
-
-	g_assertionFailure = errmsg;
-
-#ifndef __unix__
-	bombBox (errmsg);
+		file, line, funcname, expr));
 #endif
 
 	abort();
--- a/src/crashCatcher.h	Wed May 21 18:39:03 2014 +0300
+++ b/src/crashCatcher.h	Wed May 21 19:00:57 2014 +0300
@@ -17,6 +17,8 @@
  */
 
 #pragma once
+#include "main.h"
+
 #ifdef __unix__
 void initCrashCatcher();
 #else // ifdef __unix__

mercurial