aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/projectstore/projectstore.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-04-04 14:32:40 +0200
committerGitHub Enterprise <[email protected]>2024-04-04 14:32:40 +0200
commit12b7bf1c16f671c83840961c37a339141a7ffbb3 (patch)
tree3c503e6e1cd4d53b87c1baebcf9286ca8b72db06 /src/zenserver/projectstore/projectstore.cpp
parenthardening parsepackagemessage (#38) (diff)
downloadzen-12b7bf1c16f671c83840961c37a339141a7ffbb3.tar.xz
zen-12b7bf1c16f671c83840961c37a339141a7ffbb3.zip
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
Diffstat (limited to 'src/zenserver/projectstore/projectstore.cpp')
-rw-r--r--src/zenserver/projectstore/projectstore.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/zenserver/projectstore/projectstore.cpp b/src/zenserver/projectstore/projectstore.cpp
index 0109533f6..84ed6f842 100644
--- a/src/zenserver/projectstore/projectstore.cpp
+++ b/src/zenserver/projectstore/projectstore.cpp
@@ -1679,7 +1679,7 @@ ProjectStore::Project::WriteAccessTimes()
WriteFile(ProjectAccessTimesFilePath, Data.GetBuffer().AsIoBuffer());
}
- catch (std::exception& Err)
+ catch (const std::exception& Err)
{
ZEN_WARN("writing access times FAILED, reason: '{}'", Err.what());
}
@@ -1714,7 +1714,7 @@ ProjectStore::Project::NewOplog(std::string_view OplogId, const std::filesystem:
Log->Write();
return Log;
}
- catch (std::exception&)
+ catch (const std::exception&)
{
// In case of failure we need to ensure there's no half constructed entry around
//
@@ -1760,7 +1760,7 @@ ProjectStore::Project::OpenOplog(std::string_view OplogId)
return Log;
}
- catch (std::exception& ex)
+ catch (const std::exception& ex)
{
ZEN_WARN("failed to open oplog '{}' @ '{}': {}", OplogId, OplogBasePath, ex.what());
@@ -2371,7 +2371,7 @@ ProjectStore::OpenProject(std::string_view ProjectId)
Prj->Read();
return Prj;
}
- catch (std::exception& e)
+ catch (const std::exception& e)
{
ZEN_WARN("failed to open {} @ {} ({})", ProjectId, BasePath, e.what());
m_Projects.erase(std::string{ProjectId});
@@ -4017,7 +4017,7 @@ ProjectStore::CreateReferenceCheckers(GcCtx& Ctx)
}
}
}
- catch (std::exception&)
+ catch (const std::exception&)
{
while (!Checkers.empty())
{