Catch PECIErrors from supportsControl()
In future backend where supportsControl() requires a PECI call, make
sure any calls are inside a try/catch so potential errors are handled.
Change-Id: Ib35030fa4df764a3cccd922099cd76c77823b7c4
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
diff --git a/src/speed_select.cpp b/src/speed_select.cpp
index fb92dd1..3ae89b8 100644
--- a/src/speed_select.cpp
+++ b/src/speed_select.cpp
@@ -253,9 +253,9 @@
std::cerr << __func__ << ": Failed to get SST provider instance\n";
return sdbusplus::message::object_path();
}
- setPropertyCheckOrThrow(*sst);
try
{
+ setPropertyCheckOrThrow(*sst);
sst->setCurrentLevel(newConfig->level);
currentLevel = newConfig->level;
}