From 6fc851d37691b5ef1b216b8dee348e65632fa402 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 17 Jul 2017 14:10:34 +0200 Subject: [PATCH] Improve erorr message --- src/hydra-queue-runner/hydra-queue-runner.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/hydra-queue-runner/hydra-queue-runner.cc b/src/hydra-queue-runner/hydra-queue-runner.cc index 808033a0..1a67e1f4 100644 --- a/src/hydra-queue-runner/hydra-queue-runner.cc +++ b/src/hydra-queue-runner/hydra-queue-runner.cc @@ -510,9 +510,8 @@ void State::notificationSender() int res = pid.wait(); - if (res != 0) - throw Error(format("hydra-build returned exit code %1% notifying about build %2%") - % res % item.id); + if (!statusOk(res)) + throw Error("notification about build %d failed: %s", item.id, statusToString(res)); } catch (std::exception & e) { printMsg(lvlError, format("notification sender: %1%") % e.what());