mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-19 08:28:46 +00:00
Fixed error handling in for loops
This commit is contained in:
@@ -543,6 +543,7 @@ public class HueMulator implements HueErrorStringSet {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.warn("Could not send UDP Datagram packet for request.", e);
|
log.warn("Could not send UDP Datagram packet for request.", e);
|
||||||
responseString = "[{\"error\":{\"type\": 6, \"address\": \"/lights/" + lightId + "\",\"description\": \"Error on calling out to device\", \"parameter\": \"/lights/" + lightId + "state\"}}]";
|
responseString = "[{\"error\":{\"type\": 6, \"address\": \"/lights/" + lightId + "\",\"description\": \"Error on calling out to device\", \"parameter\": \"/lights/" + lightId + "state\"}}]";
|
||||||
|
i = callItems.length+1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -568,6 +569,7 @@ public class HueMulator implements HueErrorStringSet {
|
|||||||
if (doHttpRequest(anUrl, device.getHttpVerb(), device.getContentType(), body) == null) {
|
if (doHttpRequest(anUrl, device.getHttpVerb(), device.getContentType(), body) == null) {
|
||||||
log.warn("Error on calling url to change device state: " + anUrl);
|
log.warn("Error on calling url to change device state: " + anUrl);
|
||||||
responseString = "[{\"error\":{\"type\": 6, \"address\": \"/lights/" + lightId + "\",\"description\": \"Error on calling url to change device state\", \"parameter\": \"/lights/" + lightId + "state\"}}]";
|
responseString = "[{\"error\":{\"type\": 6, \"address\": \"/lights/" + lightId + "\",\"description\": \"Error on calling url to change device state\", \"parameter\": \"/lights/" + lightId + "state\"}}]";
|
||||||
|
i = callItems.length+1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user