I want to do exception handling in debug mode in Visual Studio 2015 :

 try { // ... } catch (std::exception& e) { _ASSERT_EXPR(false, e.what()); } 

However, this macro accepts extended lines, so I get hieroglyphs instead of the correct text. Is it possible to somehow correctly display the message text without the console?

    1 answer 1

    Use the _CrtDbgReport function, not _CrtDbgReportW , which is used in _ASSERT_EXPR .

     _CrtDbgReport(_CRT_ERROR, __FILE__, __LINE__, NULL, "Exception: %s", e.what()); 
    • Thank you, earned - exp