diff options
author | Deepak Kodihalli <dkodihal@in.ibm.com> | 2017-01-19 03:40:12 -0600 |
---|---|---|
committer | Deepak Kodihalli <dkodihal@in.ibm.com> | 2017-01-27 10:43:25 -0600 |
commit | f2462f0f7404400b888f47ea21c16a67dd429eb8 (patch) | |
tree | ce57fc23215e4e3fe0837597b00a2804dddda850 /logging_test.cpp | |
parent | 5d1aace69bea0c76229335dcdc09ec63eda63931 (diff) | |
download | phosphor-logging-f2462f0f7404400b888f47ea21c16a67dd429eb8.tar.gz phosphor-logging-f2462f0f7404400b888f47ea21c16a67dd429eb8.zip |
elog-gen.py : implement error inheritance
If an error inherits another error (via the error YAML interface), have
the child error inherit parent's metadata. Only single inheritance is
supported as of now.
Change-Id: I9ff295f4db04a9c5389f66e04f5d28287f9628a9
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Diffstat (limited to 'logging_test.cpp')
-rw-r--r-- | logging_test.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/logging_test.cpp b/logging_test.cpp index b781482..6a5f07f 100644 --- a/logging_test.cpp +++ b/logging_test.cpp @@ -81,7 +81,13 @@ int main() example::xyz::openbmc_project::Example::TestErrorOne:: FILE_PATH(test_string), example::xyz::openbmc_project::Example::TestErrorOne:: - FILE_NAME("elog_test_3.txt")); + FILE_NAME("elog_test_3.txt"), + example::xyz::openbmc_project::Example::TestErrorTwo:: + DEV_ADDR(0xDEAD), + example::xyz::openbmc_project::Example::TestErrorTwo:: + DEV_ID(0x100), + example::xyz::openbmc_project::Example::TestErrorTwo:: + DEV_NAME("test case 3")); } catch (elogException<example::xyz::openbmc_project::Example::TestErrorOne>& e) { @@ -115,7 +121,10 @@ int main() { elog<TestErrorOne>(TestErrorOne::ERRNUM(number), prev_entry<TestErrorOne::FILE_PATH>(), - TestErrorOne::FILE_NAME("elog_test_4.txt")); + TestErrorOne::FILE_NAME("elog_test_4.txt"), + TestErrorTwo::DEV_ADDR(0xDEAD), + TestErrorTwo::DEV_ID(0x100), + TestErrorTwo::DEV_NAME("test case 4")); } catch (elogExceptionBase& e) { |