mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 23:45:35 +08:00
Ref T321 Add extended error reporting in CAtomicFile::replaceOriginal
to try to gather more info on the problem saving the data cache session file.
This commit is contained in:
committed by
Klaus Basan
parent
c3cf39e102
commit
74f3301679
@@ -38,13 +38,20 @@
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
#if defined(QT_NO_DEBUG)
|
||||
#if defined(QT_DEBUG)
|
||||
QStringList getStackTrace()
|
||||
{
|
||||
return getStackTraceAlways();
|
||||
}
|
||||
#else
|
||||
QStringList getStackTrace()
|
||||
{
|
||||
return { "No stack trace with release build" };
|
||||
}
|
||||
#elif defined(Q_OS_WIN32)
|
||||
QStringList getStackTrace()
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN32)
|
||||
QStringList getStackTraceAlways()
|
||||
{
|
||||
static QMutex mutex;
|
||||
QMutexLocker lock(&mutex);
|
||||
@@ -84,7 +91,7 @@ namespace BlackMisc
|
||||
return result;
|
||||
}
|
||||
#elif defined(Q_CC_GNU)
|
||||
QStringList getStackTrace()
|
||||
QStringList getStackTraceAlways()
|
||||
{
|
||||
std::array<void*, 100> stack;
|
||||
auto frames = backtrace(stack.data(), stack.size());
|
||||
@@ -128,7 +135,7 @@ namespace BlackMisc
|
||||
}
|
||||
#else
|
||||
// cppcheck-suppress unusedFunction
|
||||
QStringList getStackTrace()
|
||||
QStringList getStackTraceAlways()
|
||||
{
|
||||
return { "No stack trace on this platform" };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user