summaryrefslogtreecommitdiffstats
path: root/proc_control.cpp
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-10-04 11:26:09 -0500
committerMatt Spinler <spinler@us.ibm.com>2017-10-04 12:30:58 -0500
commita231ceb41e695cfc0a77699b15e5ea4281e212a9 (patch)
tree6c0cf73c5378198f05080dcc71561376be362334 /proc_control.cpp
parentd8dd9b25ac65043ad0cb7734919bf96084b47831 (diff)
downloadopenpower-proc-control-a231ceb41e695cfc0a77699b15e5ea4281e212a9.tar.gz
openpower-proc-control-a231ceb41e695cfc0a77699b15e5ea4281e212a9.zip
Use all phosphor-dbus-interfaces errors
Remove the local error definitions and use the ones in phosphor-dbus-interfaces instead as the ones there suit our purposes and it simplifies this repository to do so. Change-Id: I18428c496914153270ecb181e7193acd0e386e97 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'proc_control.cpp')
-rw-r--r--proc_control.cpp32
1 files changed, 20 insertions, 12 deletions
diff --git a/proc_control.cpp b/proc_control.cpp
index aceb6d6..f825510 100644
--- a/proc_control.cpp
+++ b/proc_control.cpp
@@ -18,11 +18,19 @@
#include <iostream>
#include <phosphor-logging/log.hpp>
#include <phosphor-logging/elog.hpp>
-#include "registration.hpp"
-#include "elog-errors.hpp"
+#include <phosphor-logging/elog-errors.hpp>
#include <xyz/openbmc_project/Common/error.hpp>
+#include <xyz/openbmc_project/Common/Device/error.hpp>
+#include <xyz/openbmc_project/Common/File/error.hpp>
+#include "registration.hpp"
using namespace openpower::util;
+namespace common_error = sdbusplus::xyz::openbmc_project::
+ Common::Error;
+namespace device_error = sdbusplus::xyz::openbmc_project::
+ Common::Device::Error;
+namespace file_error = sdbusplus::xyz::openbmc_project::
+ Common::File::Error;
void usage(char** argv, const ProcedureMap& procedures)
{
@@ -60,29 +68,29 @@ int main(int argc, char** argv)
{
procedure->second();
}
- catch (org::open_power::Proc::CFAM::SeekFailure& e)
+ catch (file_error::Seek& e)
{
- commit<org::open_power::Proc::CFAM::SeekFailure>();
+ commit<file_error::Seek>();
return -1;
}
- catch (org::open_power::Proc::CFAM::OpenFailure& e)
+ catch (file_error::Open& e)
{
- commit<org::open_power::Proc::CFAM::OpenFailure>();
+ commit<file_error::Open>();
return -1;
}
- catch (org::open_power::Proc::CFAM::WriteFailure& e)
+ catch (device_error::WriteFailure& e)
{
- commit<org::open_power::Proc::CFAM::WriteFailure>();
+ commit<device_error::WriteFailure>();
return -1;
}
- catch (org::open_power::Proc::CFAM::ReadFailure& e)
+ catch (device_error::ReadFailure& e)
{
- commit<org::open_power::Proc::CFAM::ReadFailure>();
+ commit<device_error::ReadFailure>();
return -1;
}
- catch (sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument& e)
+ catch (common_error::InvalidArgument& e)
{
- commit<sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument>();
+ commit<common_error::InvalidArgument>();
return -1;
}
OpenPOWER on IntegriCloud