File indexing completed on 2025-05-11 08:24:32
0001
0002
0003
0004 #include <cstdio>
0005 #include <stdexcept>
0006 #include "dl-load.h"
0007 void exception_base(bool throw_runtime)
0008 {
0009 printf("%s: begin\n", __func__);
0010 try
0011 {
0012 if (throw_runtime)
0013 throw std::runtime_error("eb: throw std::runtime_error");
0014 else
0015 throw dl_test_throw_me("eb: throw me");
0016 }
0017 catch (std::exception const& e)
0018 {
0019 printf("%s: caught: %s\n", __func__, e.what());
0020 }
0021 catch (dl_test_throw_me const& e)
0022 {
0023 printf("%s: caught: %s\n", __func__, e.what());
0024 }
0025 catch (...)
0026 {
0027 printf("%s: caught: unknown\n", __func__);
0028 }
0029 printf("%s: end\n", __func__);
0030 }