From 12b7bf1c16f671c83840961c37a339141a7ffbb3 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Thu, 4 Apr 2024 14:32:40 +0200 Subject: improved assert (#37) - Improvement: Add file and line to ASSERT exceptions - Improvement: Catch call stack when throwing assert exceptions and log/output call stack at important places to provide more context to caller --- src/zenutil/openprocesscache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/zenutil/openprocesscache.cpp') diff --git a/src/zenutil/openprocesscache.cpp b/src/zenutil/openprocesscache.cpp index 39e4aea90..fb654bde2 100644 --- a/src/zenutil/openprocesscache.cpp +++ b/src/zenutil/openprocesscache.cpp @@ -42,7 +42,7 @@ OpenProcessCache::~OpenProcessCache() } m_Sessions.clear(); } - catch (std::exception& Ex) + catch (const std::exception& Ex) { ZEN_ERROR("OpenProcessCache destructor failed with reason: `{}`", Ex.what()); } @@ -175,7 +175,7 @@ OpenProcessCache::GcWorker() { GCHandles(); } - catch (std::exception& Ex) + catch (const std::exception& Ex) { ZEN_ERROR("gc of open process cache failed with reason: `{}`", Ex.what()); } -- cgit v1.2.3