TRY/CATCH_ALL vs try/catch

后端 未结 4 1263
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-18 03:36

I\'ve been using c++ for a while, and I\'m familiar with normal try/catch. However, I now find myself on Windows, coding in VisualStudio for COM development. Several parts

4条回答
  •  感动是毒
    2021-01-18 04:27

    It's an MFC macro:
    http://msdn.microsoft.com/en-us/library/t8dwzac0%28VS.71%29.aspx

    This page says they're a remnant from MFC 1.0 - use normal C++ exceptions in new code:

    MFC versions lower than 3.0 did not support the C++ exception mechanism. MFC provided macros to deal with exceptions.

提交回复
热议问题