From ba7b5fea818f65949cd074de9322094d3c54fb7b Mon Sep 17 00:00:00 2001 From: Matt Spinler Date: Wed, 25 Apr 2018 15:26:10 -0500 Subject: Throw custom exceptions on D-Bus method failures All 3 fan applications - control, monitor, and presence have cases where it is expected that a getProperty call may fail because a sensor is missing. While the applications already handle this, the InternalFailure exception that was being thrown by the underlying call generates log entries that make it look like something bad happened. The custom exceptions now being thrown do not log anything on creation, but store all of the failing information so that any callers could still log the info if they wanted to. Tested: Boot a water cooled Witherspoon and see the fan presence and monitor applications not look like they are failing. Boot a system without the fan hwmon running, and see fan-control-init still show the fails. Change-Id: Ifd8ad6e3deb492bbaf33f12c7258125dce1e5ea8 Signed-off-by: Matt Spinler --- control/zone.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'control/zone.cpp') diff --git a/control/zone.cpp b/control/zone.cpp index 325a5b8..f4c50d9 100644 --- a/control/zone.cpp +++ b/control/zone.cpp @@ -196,7 +196,7 @@ void Zone::setServices(const Group* group) "NameHasOwner", name); } - catch (const InternalFailure& ife) + catch (const util::DBusMethodError& e) { // Failed to get service name owner state hasOwner = false; -- cgit v1.2.1