aboutsummaryrefslogtreecommitdiff
path: root/src/error-demo
diff options
context:
space:
mode:
authorBen Burdette <bburdette@gmail.com>2020-04-29 18:57:05 -0600
committerBen Burdette <bburdette@gmail.com>2020-04-29 18:57:05 -0600
commit39ff80d031c5c9c1831ba5ea597c0de0181bfe34 (patch)
tree8a52bc4f5a42040ef8fd09b20e88b3bcaf30cc05 /src/error-demo
parent2d0f766a778ac790be1ab1918db7c319ac7e5792 (diff)
errorinfo constructor test
Diffstat (limited to 'src/error-demo')
-rw-r--r--src/error-demo/error-demo.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/error-demo/error-demo.cc b/src/error-demo/error-demo.cc
index 437a761c4..2c4f2da6e 100644
--- a/src/error-demo/error-demo.cc
+++ b/src/error-demo/error-demo.cc
@@ -23,6 +23,16 @@ int main()
logger->logEI(e.info());
}
+
+ // ErrorInfo constructor
+ try {
+ auto e = Error("generic error");
+ throw DemoError(e.info());
+ } catch (Error &e) {
+ logger->logEI(e.info());
+ }
+
+
// For completeness sake, info through vomit levels.
// But this is maybe a heavy format for those.
logger->logEI(