1
Fork 0
hermetic_cc_toolchain/test/exception.cpp

13 lines
257 B
C++
Raw Normal View History

2021-04-10 01:05:01 +03:00
#include <iostream>
int main() {
std::cerr << "will throw and expect to catch an error..." << std::endl;
try {
throw "error";
} catch (const char* msg) {
std::cerr << "caught: " << msg << std::endl;
}
std::cerr << "done" << std::endl;
}