summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarri Devender Rao <devenrao@in.ibm.com>2017-04-15 06:00:33 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-04-27 02:34:22 +0000
commitd1a67538cf593f2fa9b4bdcbefc3da6a574491d8 (patch)
treed3c2cac3132e31877ac4a2e986f2c9a01ee5c0cc
parent5422e0e9f96e2fd2591a3a8d89a78d427b0ac5a3 (diff)
downloadphosphor-host-ipmid-d1a67538cf593f2fa9b4bdcbefc3da6a574491d8.tar.gz
phosphor-host-ipmid-d1a67538cf593f2fa9b4bdcbefc3da6a574491d8.zip
storageaddesel: switch to 'report' error API
phosphor-logging now has an interface to avoid needing a try/catch to report an error in the same location it is discovered, so switch to using it. Change-Id: I3feb36e41e8dd18a279b34508f8967a4f74485e4 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
-rw-r--r--storageaddsel.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/storageaddsel.cpp b/storageaddsel.cpp
index a1e25d2..b8b7a8d 100644
--- a/storageaddsel.cpp
+++ b/storageaddsel.cpp
@@ -190,17 +190,8 @@ int send_esel_to_dbus(const char *desc, const char *sev, const char *details, ui
}
selData[debuglen*3] = '\0';
- log<level::INFO>("Received Host Event", entry("ESEL=%s", selData.get()));
-
- try
- {
- elog<org::open_power::Error::Host::Event>(
- prev_entry<org::open_power::Error::Host::Event::ESEL>());
- }
- catch (org::open_power::Error::Host::Event& e)
- {
- commit(org::open_power::Error::Host::Event::errName);
- }
+ using error = org::open_power::Error::Host::Event;
+ report<error>(error::ESEL(selData.get()));
return 0;
}
OpenPOWER on IntegriCloud