diff options
| author | Stefan Boberg <[email protected]> | 2021-09-15 21:31:39 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-15 21:31:39 +0200 |
| commit | d29b3ccba64944c9aa2ec3d08079170d47f9c4db (patch) | |
| tree | 7b2bbd0832a12193229bfa5a94890cf79f4e44d0 | |
| parent | Added explicit logging initialization to main() of standalone executables, to... (diff) | |
| download | zen-d29b3ccba64944c9aa2ec3d08079170d47f9c4db.tar.xz zen-d29b3ccba64944c9aa2ec3d08079170d47f9c4db.zip | |
Added more context to missing chunk exceptions
| -rw-r--r-- | zenserver/compute/apply.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/zenserver/compute/apply.cpp b/zenserver/compute/apply.cpp index c3d83b2b5..7b76bb80b 100644 --- a/zenserver/compute/apply.cpp +++ b/zenserver/compute/apply.cpp @@ -647,6 +647,7 @@ CbPackage HttpFunctionService::ExecAction(const WorkerDesc& Worker, CbObject Action) { using namespace std::literals; + using namespace fmt::literals; std::filesystem::path SandboxPath = CreateNewSandbox(); @@ -667,7 +668,7 @@ HttpFunctionService::ExecAction(const WorkerDesc& Worker, CbObject Action) if (!DataBuffer) { - throw std::runtime_error("Chunk missing" /* ADD CONTEXT */); + throw std::runtime_error("worker CAS chunk '{}' missing"_format(Hash)); } zen::WriteFile(FilePath, DataBuffer); @@ -693,7 +694,7 @@ HttpFunctionService::ExecAction(const WorkerDesc& Worker, CbObject Action) if (!DataBuffer) { - throw std::runtime_error("Chunk missing" /* ADD CONTEXT */); + throw std::runtime_error("worker CAS chunk '{}' missing"_format(Hash)); } zen::WriteFile(FilePath, DataBuffer); @@ -712,7 +713,7 @@ HttpFunctionService::ExecAction(const WorkerDesc& Worker, CbObject Action) if (!DataBuffer) { - throw std::runtime_error("Chunk missing" /* ADD CONTEXT */); + throw std::runtime_error("input CID chunk '{}' missing"_format(Cid)); } zen::WriteFile(FilePath, DataBuffer); |