| 46 | |
| 47 | |
| 48 | int main() { |
| 49 | initQuESTEnv(); |
| 50 | |
| 51 | setInputErrorHandler(myErrorHandlerA); |
| 52 | |
| 53 | try { |
| 54 | Qureg qureg = createQureg(-123); |
| 55 | } catch (std::runtime_error& e) { |
| 56 | std::cout |
| 57 | << "Error caught! Function aborted, but execution continues." |
| 58 | << std::endl |
| 59 | << std::endl; |
| 60 | } |
| 61 | |
| 62 | setInputErrorHandler(myErrorHandlerB); |
| 63 | initQuESTEnv(); // illegal to recall |
| 64 | |
| 65 | std::cout << "this will never be reached, because myErrorHandlerB exits!" << std::endl; |
| 66 | |
| 67 | finalizeQuESTEnv(); |
| 68 | } |
nothing calls this directly
no test coverage detected