cpp: catch exception with ellipsis and see the information
问题 I know that you can catch "all exceptions" and print the exception by try { //some code... }catch(const std::exception& e) { cout << e.what(); } but this is just for exceptions derived from std::exception. I was wondering if there is a way to get some information from an ellipsis catch try { //some code... }catch(...) { // ?? } If the mechanism is the same as ellipsis for functions then I should be able to do something like casting the argument of the va_list and trying to call the what()