diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2018-05-11 10:14:44 -0500 |
---|---|---|
committer | Matthew Barth <msbarth@linux.ibm.com> | 2018-05-17 17:10:38 +0000 |
commit | 88923a06e6fdceb452157b712587176b677bb917 (patch) | |
tree | 51259950567b26af4583ce2895c88cf542cc6df8 /control | |
parent | 6f30fd61a91b345a00e49bd0c6460d6694ddf2e8 (diff) | |
download | phosphor-fan-presence-88923a06e6fdceb452157b712587176b677bb917.tar.gz phosphor-fan-presence-88923a06e6fdceb452157b712587176b677bb917.zip |
Throw DBusPropertyError for all property accesses
On all get/set property functions, when an error occurs performing the
access of a property, throw a DBusPropertyError exception containing the
identifying parameters of the property.
Tested:
DBusPropertyError exception occurs on failing to set a property
DBusPropertyError exception occurs on failing to get a property
Change-Id: I9882d62d75153b4320a8d4a21ba7a52efbdd0af2
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control')
-rw-r--r-- | control/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/control/main.cpp b/control/main.cpp index dd9330d..80a7df6 100644 --- a/control/main.cpp +++ b/control/main.cpp @@ -101,6 +101,14 @@ int main(int argc, char* argv[]) entry("INTERFACE=%s", e.interface.c_str()), entry("METHOD=%s", e.method.c_str())); } + catch (phosphor::fan::util::DBusPropertyError& e) + { + log<level::ERR>("Uncaught DBus property access failure exception", + entry("BUSNAME=%s", e.busName.c_str()), + entry("PATH=%s", e.path.c_str()), + entry("INTERFACE=%s", e.interface.c_str()), + entry("PROPERTY=%s", e.property.c_str())); + } return -1; } |