bindings: cxx: check for error from gpiod_line_bulk_new()
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Thu, 3 Dec 2020 12:55:00 +0000 (13:55 +0100)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 14 Dec 2020 14:56:30 +0000 (15:56 +0100)
commit59c21bdaf2c04b2627b62cd2961812d6a982f02f
tree8b044ebdc251890c1ee6df5a6e2fe4540720cc1e
parentd04444677c7c926860afe79b89657b3fe0b03632
bindings: cxx: check for error from gpiod_line_bulk_new()

We call gpiod_line_bulk_new() in C++ bindings but never check its return
value. This function can fail so add a private method to line_bulk that
calls it and throws an exception if it returns NULL.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
bindings/cxx/gpiod.hpp
bindings/cxx/line_bulk.cpp