22 [[noreturn]]
void bar() {
23 throw std::runtime_error(
"hello");
28 std::cerr <<
"--- " << prefix <<
"\n";
30 for (
auto& exc : exceptions) {
31 std::cerr << exc <<
"\n";
39 }
catch (
const std::exception& e) {
43 }
catch (
const std::exception& e) {
44 dumpExceptions(
"foo: catch, exception thrown from previous catch block");
48 [[noreturn]]
void baz() {
56 }
catch (
const std::exception& e) {
63 std::exception_ptr exc;
67 exc = std::current_exception();
71 std::rethrow_exception(exc);
78 std::exception_ptr exc;
80 throw std::out_of_range(
"x");
82 exc = std::current_exception();
86 std::rethrow_exception(exc);
void dumpExceptions(const char *prefix)
bool prefix(Cursor &c, uint32_t expected)
std::vector< ExceptionInfo > getCurrentExceptions()