From d19ae55c71ecdb3ba6de6a88991b6ceecdc7a5ec Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 18 Feb 2019 01:11:16 +0100 Subject: [PATCH] hook: propagate error in hook_process() --- src/villas-hook.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/villas-hook.cpp b/src/villas-hook.cpp index 45f9288fd..2d30b86e9 100644 --- a/src/villas-hook.cpp +++ b/src/villas-hook.cpp @@ -215,7 +215,9 @@ check: if (optarg == endptr) unsigned send = recv; - hook_process(&h, smps, (unsigned *) &send); + ret = hook_process(&h, smps, (unsigned *) &send); + if (ret < 0) + throw RuntimeError("Failed to process samples"); sent = io_print(&io, smps, send); if (sent < 0)