From 5b17924cdf56c34be4d2abf5defed693f315de2d Mon Sep 17 00:00:00 2001 From: LordGrey Date: Wed, 10 Apr 2019 23:08:56 +0200 Subject: [PATCH] Throw Execption as "return false" is not handled if no hostname configured nor device was discovered --- libsrc/leddevice/dev_net/LedDeviceNanoleaf.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libsrc/leddevice/dev_net/LedDeviceNanoleaf.cpp b/libsrc/leddevice/dev_net/LedDeviceNanoleaf.cpp index 288776ee..ff7324cd 100644 --- a/libsrc/leddevice/dev_net/LedDeviceNanoleaf.cpp +++ b/libsrc/leddevice/dev_net/LedDeviceNanoleaf.cpp @@ -102,8 +102,7 @@ bool LedDeviceNanoleaf::init(const QJsonObject &deviceConfig) { if ( _hostname.isEmpty() ) //Discover Nanoleaf device if ( !discoverNanoleafDevice() ) { - Error(_log, "No target IP defined nor Nanoleaf device discovered"); - return false; + throw std::runtime_error("No target IP defined nor Nanoleaf device discovered"); } //Get Nanoleaf device details and configuration