Files
llgo/c/setjmp/trycatch/_code/try_catch.cpp

14 lines
225 B
C++
Raw Normal View History

2024-06-08 00:08:29 +08:00
#include <exception>
#include <stdio.h>
extern "C" void throwCppException();
int main() {
try {
throwCppException();
} catch (std::exception& e) {
printf("Hi, %s\n", e.what());
}
return 0;
}