Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

SEH hanlder cause compiler warnings and errors

$
0
0

I use a SEH handler in my code, like this:

__try

{

.. Some codes ...

}

__except(

EXCEPTION_EXECUTE_HANDLER

)

{

  TRACE(_T("Exception"));

}

but get the following compiler errors:

I just use __try and __catch, which is able to catch the exception. However, I get a lot of compiler warnings and errors:

1>e:\test.cpp(3310): warning C4509: nonstandard extension used: 'CMyClass::Test' uses SEH and 'iterator' has destructor
1>          e:\test.cpp(3290) : see declaration of 'iterator'

e:\test.cpp(3450): error C2712: Cannot use __try in functions that require object unwinding

How to fix this?

Thanks


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>