Portably handle exceptional errors in C++
问题 I'm working on porting a Visual C++ application to GCC (should build on MingW and Linux). The existing code uses __try { ... } __except(1) { ... } blocks in a few places so that almost nothing (short of maybe out of memory type errors?) would make the program exit without doing some minimal logging. What are the options for doing something similar with GCC? Edit: Thanks for the pointer to /EH options in Visual Studio, what I need now is some examples on how to handle signals on Linux. I've