catch(…) is not catching an exception, my program is still crashing

后端 未结 4 1101
余生分开走
余生分开走 2021-02-19 17:01

I\'m having a problem with a tester that my application crashes in initialization. I added more logging and exception handling but it still crashes with the generic \"this progr

4条回答
  •  旧时难觅i
    2021-02-19 17:13

    So far I know, there can be at least two situations where catch(...) cannot actually catch

    1. More than 1 unhandled Exception: when an exception is raised before a previously occurred exception is handled, then c++ can not handle it, and application will crash.
    2. Throwing exception that is not in exception specification list: if any method throws an exception which is not in the exception specification list (in any) then unexpected will be called which calls abort.

提交回复
热议问题