aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorBen Burdette <bburdette@gmail.com>2020-05-04 16:19:57 -0600
committerBen Burdette <bburdette@gmail.com>2020-05-04 16:19:57 -0600
commit7ffb5efdbc943851d2ee9d0573dca3e96b9bd742 (patch)
tree26a2aeeb28b86b95917a01278fed9b14faefe69d /src/libstore/build.cc
parentf30de61578edd9c19744256985185045e7baab84 (diff)
appending to hints; remove _printError
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index bacbd5808..f8cc1ce36 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -488,14 +488,18 @@ void handleDiffHook(
auto diffRes = runProgram(diffHookOptions);
if (!statusOk(diffRes.first))
- throw ExecError(diffRes.first, "diff-hook program '%1%' %2%", diffHook, statusToString(diffRes.first));
+ throw ExecError(diffRes.first,
+ "diff-hook program '%1%' %2%",
+ diffHook,
+ statusToString(diffRes.first));
if (diffRes.second != "")
printError(chomp(diffRes.second));
} catch (Error & error) {
- // logError(error.info())
- // TODO append message onto errorinfo...
- _printError("diff hook execution failed: %s", error.what());
+ ErrorInfo ei = error.info();
+ string prevhint = (error.info().hint.has_value() ? error.info().hint->str() : "");
+ ei.hint = std::optional(hintfmt("diff hook execution failed: %s", prevhint));
+ logError(ei);
}
}
}