diff options
Diffstat (limited to 'src/error-demo/error-demo.cc')
-rw-r--r-- | src/error-demo/error-demo.cc | 10 |
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( |