C++ exception handler used, but unwind semantics are not enabled. Specify -GX
C++ exception handling was used but the Enable Exception Handling (/GX) option was not selected.
When the /GX option has not been enabled, an object with automatic storage in the frame between the function doing the throw and the function catching the throw will not be destroyed. However, an object with automatic storage created in a try or catch block will be destroyed.