aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/logging.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-05-24 15:15:02 +0200
committerGitHub <[email protected]>2023-05-24 15:15:02 +0200
commitc69b7341838f86f73519e20b83996b609cda7f6c (patch)
tree394a00b17814c943059513f4781065c236753d3b /src/zencore/logging.cpp
parentcache log sessionid (#297) (diff)
downloadzen-c69b7341838f86f73519e20b83996b609cda7f6c.tar.xz
zen-c69b7341838f86f73519e20b83996b609cda7f6c.zip
block destructors from throwing exceptions (#321)
* ~FileMapping() is not allowed to throw exceptions * ~ScopedActivityBase() should not call ZEN_ASSERT (which causes SIGABORT on error) * ProjectStore::Project::WriteAccessTimes() which is called from ProjectStore::~Project() must not throw exceptions * changelog
Diffstat (limited to 'src/zencore/logging.cpp')
-rw-r--r--src/zencore/logging.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/zencore/logging.cpp b/src/zencore/logging.cpp
index 07b379cba..dc923f45e 100644
--- a/src/zencore/logging.cpp
+++ b/src/zencore/logging.cpp
@@ -131,7 +131,11 @@ ScopedActivityBase::ScopedActivityBase() : m_NextScope{t_ScopeStack}
ScopedActivityBase::~ScopedActivityBase()
{
- ZEN_ASSERT(t_ScopeStack == this);
+ if (t_ScopeStack != this)
+ {
+ ZEN_ERROR("invalid t_ScopeStack in ~ScopedActivityBase(). Expected {:#x}, found {:#x}", (uintptr_t)this, (uintptr_t)t_ScopeStack);
+ return;
+ }
t_ScopeStack = m_NextScope;
}