nonstandard extension used: 'function' uses SEH and 'object' has destructor
You should not use structured exception handling in functions that use objects with destructors because if an exception occurs, the object’s destructor will not be called. You might want to use C++ exception handling instead. See C++ Exception Handling Syntax for more information.