build-remote: catch exceptions in Instance::build
this was just forgotten when the migration was done. fixes #1083 Change-Id: I7a94edf304323b0c43e0a1cff39e5a52696c50e3
This commit is contained in:
@@ -405,7 +405,7 @@ kj::Promise<void> Instance::init(InitContext context)
|
||||
}
|
||||
|
||||
kj::Promise<void> Instance::buildImpl(BuildContext context)
|
||||
{
|
||||
try {
|
||||
if (!initialized) {
|
||||
throw Error("build hook not fully initialized");
|
||||
}
|
||||
@@ -461,6 +461,8 @@ kj::Promise<void> Instance::buildImpl(BuildContext context)
|
||||
|
||||
auto ac = context.getResults().initResult().initGood().initAccept();
|
||||
ac.setMachine(kj::heap<AcceptedBuild>(store, drvPath, std::move(*builder)));
|
||||
} catch (...) {
|
||||
RPC_FILL(context.getResults(), initResult, std::current_exception());
|
||||
}
|
||||
|
||||
kj::Promise<void> Instance::build(BuildContext context)
|
||||
|
||||
Reference in New Issue
Block a user