diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-06-22 18:43:43 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-06-25 21:27:34 +0300 |
commit | 0ecff9dd3418e8c18fa423ba53e9cab1df8be553 (patch) | |
tree | ae9f5eaade7bf8138cea1d518f544696d07f7a18 /src/sync.cpp | |
parent | bbe9cf4fe4ff9a8d1ea557fb763c76100db07679 (diff) |
Improve "detected inconsistent lock order" error message
Diffstat (limited to 'src/sync.cpp')
-rw-r--r-- | src/sync.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sync.cpp b/src/sync.cpp index e69ff090c6..10f0483189 100644 --- a/src/sync.cpp +++ b/src/sync.cpp @@ -60,7 +60,7 @@ struct CLockLocation { std::string ToString() const { return strprintf( - "%s %s:%s%s (in thread %s)", + "'%s' in %s:%s%s (in thread '%s')", mutexName, sourceFile, sourceLine, (fTry ? " (TRY)" : ""), m_thread_name); } @@ -129,7 +129,7 @@ static void potential_deadlock_detected(const LockPair& mismatch, const LockStac LogPrintf(" %s\n", i.second.ToString()); } if (g_debug_lockorder_abort) { - tfm::format(std::cerr, "Assertion failed: detected inconsistent lock order at %s:%i, details in debug log.\n", __FILE__, __LINE__); + tfm::format(std::cerr, "Assertion failed: detected inconsistent lock order for %s, details in debug log.\n", s2.back().second.ToString()); abort(); } throw std::logic_error(strprintf("potential deadlock detected: %s -> %s -> %s", mutex_b, mutex_a, mutex_b)); |