Try…Catch doesn’t catch access violation exception?-ZZ

    From:  Date: 2020-10-24 02:11 PM

    Under certain abnormal conditions, my application causes an access violation (c0000005), and the program crashes. I have tried inserting

    try {

    } catch (…) {
    around the offending code, but this doesn’t catch this exception.
    Is it possible for the try…catch mechanism to catch this kind of exception?

    Replay: By default C++ does not catch this type of exceptions (asynchronous). The following compiler switch (/EHa) should be what you need to make it work:


    EMail: * 如果为有效的邮箱地址,将自动发送站长回复