1
hermetic_cc_toolchain/test/exception.cpp
2021-04-09 15:05:01 -07:00

13 lines
257 B
C++

#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;
}