#include #include using namespace std; void BadFunctionCall(void) { throw 20; } class PtrUsrT { public: PtrUsrT(size_t s) { size = s; unique_ptr data = nullptr; data = make_unique(s); // some computations BadFunctionCall(); // other computations return ; } private: size_t size; }; int main() { try { PtrUsrT p(4); } catch (...) { } return 0; }