diff options
Diffstat (limited to 'src/zenstore/workspaces.cpp')
| -rw-r--r-- | src/zenstore/workspaces.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/zenstore/workspaces.cpp b/src/zenstore/workspaces.cpp index d30a27e33..be921552a 100644 --- a/src/zenstore/workspaces.cpp +++ b/src/zenstore/workspaces.cpp @@ -302,7 +302,14 @@ namespace { RootDir = Parent / DirectoryName, RelativeRoot = RelativeRoot.empty() ? DirectoryName : RelativeRoot / DirectoryName]() { auto _ = MakeGuard([DataPtr]() { DataPtr->WorkLatch.CountDown(); }); - DataPtr->Traverse(RelativeRoot, RootDir); + try + { + DataPtr->Traverse(RelativeRoot, RootDir); + } + catch (const std::exception& Ex) + { + ZEN_WARN("Exception while traversing path {} {}: {}", RelativeRoot, RootDir, Ex.what()); + } }); return false; } @@ -632,8 +639,15 @@ Workspaces::GetWorkspaceShareChunks(const Oid& WorkspaceId, { WorkLatch.AddCount(1); WorkerPool.ScheduleWork([&, Index]() { - auto _ = MakeGuard([&WorkLatch]() { WorkLatch.CountDown(); }); - Chunks[Index] = GetOne(RootPath, *WorkspaceAndShare.second, ChunkRequests[Index]); + auto _ = MakeGuard([&WorkLatch]() { WorkLatch.CountDown(); }); + try + { + Chunks[Index] = GetOne(RootPath, *WorkspaceAndShare.second, ChunkRequests[Index]); + } + catch (const std::exception& Ex) + { + ZEN_WARN("Exception while fetching chunks, chunk {}: {}", ChunkRequests[Index].ChunkId, Ex.what()); + } }); } WorkLatch.CountDown(); |