aboutsummaryrefslogtreecommitdiff
path: root/zenserver/compute/apply.cpp
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-09-16 10:13:28 +0200
committerMartin Ridgers <[email protected]>2021-09-16 10:13:58 +0200
commit7aa3ceabe4254479bd066ae3ea941396fdc6733c (patch)
treea7d0a7fde0a5a3c42302238965c25c665fc28005 /zenserver/compute/apply.cpp
parentMissing include (diff)
parentAdded some placeholder HttpClient functions to be fleshed out (diff)
downloadzen-7aa3ceabe4254479bd066ae3ea941396fdc6733c.tar.xz
zen-7aa3ceabe4254479bd066ae3ea941396fdc6733c.zip
Merge from main
Diffstat (limited to 'zenserver/compute/apply.cpp')
-rw-r--r--zenserver/compute/apply.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/zenserver/compute/apply.cpp b/zenserver/compute/apply.cpp
index 6eeb6cf70..7b76bb80b 100644
--- a/zenserver/compute/apply.cpp
+++ b/zenserver/compute/apply.cpp
@@ -114,7 +114,7 @@ BasicFunctionJob::Wait(uint32_t TimeoutMs)
return true;
}
- throw std::exception("Failed wait on process handle");
+ throw std::runtime_error("Failed wait on process handle");
}
int
@@ -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::exception("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::exception("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::exception("Chunk missing" /* ADD CONTEXT */);
+ throw std::runtime_error("input CID chunk '{}' missing"_format(Cid));
}
zen::WriteFile(FilePath, DataBuffer);