From: Bartosz Golaszewski Date: Wed, 7 Aug 2019 08:51:41 +0000 (+0200) Subject: bindings: cxx: add a missing throw to line::event_get_fd() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d001dde47cc0df44ad79aa19bfe5bafaf4ba31bd;p=qemu-gpiodev%2Flibgpiod.git bindings: cxx: add a missing throw to line::event_get_fd() If the call to gpiod_line_event_get_fd() fails, we're not actually throwing the exception - we're only creating it on stack. Add the missing throw keyword. Fixes: 8078a4a2ad90 ("bindings: implement C++ bindings") Signed-off-by: Bartosz Golaszewski --- diff --git a/bindings/cxx/line.cpp b/bindings/cxx/line.cpp index 989976e..4ccbd15 100644 --- a/bindings/cxx/line.cpp +++ b/bindings/cxx/line.cpp @@ -183,8 +183,8 @@ int line::event_get_fd(void) const int ret = ::gpiod_line_event_get_fd(this->_m_line); if (ret < 0) - ::std::system_error(errno, ::std::system_category(), - "unable to get the line event file descriptor"); + throw ::std::system_error(errno, ::std::system_category(), + "unable to get the line event file descriptor"); return ret; }