aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-10-23 15:17:39 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-10-23 15:17:39 +0200
commit12d9dcaf8af2bd668c1f03275d82314347c0c153 (patch)
tree361714e651545099c6f34d2927b47a3f86e7aa9d /src/main.cpp
parentRemove lib/ as includepath (diff)
downloadsmolbote-12d9dcaf8af2bd668c1f03275d82314347c0c153.tar.xz
Fix breakpad integration
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 4d24084..6ceacab 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -153,8 +153,11 @@ int main(int argc, char **argv)
app.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings, true);
#ifdef BreakpadEnabled
+ const std::string crashpath = config->value<std::string>("browser.crash.path").value_or("/tmp");
+ assert(!crashpath.empty());
+
BreakpadContext ctx;
- google_breakpad::MinidumpDescriptor descriptor(config->value<std::string>("browser.crash.path").value_or("/tmp").c_str());
+ google_breakpad::MinidumpDescriptor descriptor(crashpath.c_str());
const auto crashHandler = config->value<std::string>("browser.crash.handler");
if(crashHandler) {
@@ -166,6 +169,10 @@ int main(int argc, char **argv)
// minidump descriptor, filter callback, minidump callback, callback_context, install handler, server_fd
google_breakpad::ExceptionHandler eh(descriptor, nullptr, dumpCallback, &ctx, true, -1);
+
+#ifdef QT_DEBUG
+ qDebug("Installed breakpad exception handler (path=%s)", crashpath.c_str());
+#endif
#endif
// translator