summaryrefslogtreecommitdiffstats
path: root/callouts
diff options
context:
space:
mode:
authorDeepak Kodihalli <dkodihal@in.ibm.com>2017-03-09 23:50:43 -0600
committerPatrick Williams <patrick@stwcx.xyz>2017-03-15 21:11:40 +0000
commit153311005f6c4f0de710adebaf93a98cc2ca8ebc (patch)
tree2032a8d03490b8a7c4dd56691188385d5fcf5676 /callouts
parent682326a19c45b68299cb295b69754a9eb3154f48 (diff)
downloadphosphor-logging-153311005f6c4f0de710adebaf93a98cc2ca8ebc.tar.gz
phosphor-logging-153311005f6c4f0de710adebaf93a98cc2ca8ebc.zip
Map sdbusplus exception to phosphor exception
Errors will be created by using the sdbusplus error types, which results in an sdbusplus exception being thrown. Error metadata can be verified at compile-time by checking the error against phosphor-logging error types. This commit maps the sdbusplus error type to the phosphor type, for this purpose, via template specializations. Change-Id: Iee37e2a3846cc3acf3a62270a520ff0c395fd36d Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Diffstat (limited to 'callouts')
-rw-r--r--callouts/callout_test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/callouts/callout_test.cpp b/callouts/callout_test.cpp
index 2af6dc0..2eff6a0 100644
--- a/callouts/callout_test.cpp
+++ b/callouts/callout_test.cpp
@@ -1,4 +1,5 @@
#include <iostream>
+#include <sdbusplus/exception.hpp>
#include <phosphor-logging/elog.hpp>
#include <phosphor-logging/elog-errors.hpp>
#include "elog_meta.hpp"
@@ -21,7 +22,7 @@ int main(int argc, char** argv)
TestCallout::CALLOUT_ERRNO_TEST(0),
TestCallout::CALLOUT_DEVICE_PATH_TEST(argv[1]));
}
- catch (elogException<TestCallout>& e)
+ catch (TestCallout& e)
{
commit(e.name());
}
OpenPOWER on IntegriCloud