Debian Codegraph @

gcc/testsuite/g++.dg/contracts/except_preload_handler/README

raw
1 build and install gcc to $prefix, then run:
2 LD_LIBRARY_PATH=$prefix/lib64 CXX=$prefix/bin/g++ make run
3
4 this test has a custom handle_contract_violation that throws an exception
5 this test is built with -fcontract-continuation-mode=on
6
7 since 1) our fun() is not marked noexcept and 2) the continue mode is set to
8 on, we expect the exception thrown within the contract violation handler to
9 propagate back up into the catch block located in main()
10
11 expected output therefore ends in:
12 synth caught indirect: -1
13