In C++, if the construction fails (with an exception), no other member function - not even the destructor - gets called and the resource is not acquired.
This is one reason many people think exceptions in C++ are harmful, they cause unclear implicit behavior. Much better to handle a failure explicitly outside the constructor