goldendict-ng/src/termination.cc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
461 B
C++
Raw Normal View History

2022-03-13 05:10:01 +00:00
2012-02-20 21:47:14 +00:00
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
#include "termination.hh"
#include <exception>
#include <QtCore>
static void termHandler()
{
qDebug() << "GoldenDict has crashed unexpectedly.\n\n";
2022-03-13 05:10:01 +00:00
if ( logFilePtr && logFilePtr->isOpen() )
logFilePtr->close();
2022-03-13 05:10:01 +00:00
abort();
}
void installTerminationHandler()
{
std::set_terminate( termHandler );
}