Constructors in Exception Handling (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Standard C++ Exception Handling

Class constructors can throw exceptions if they cannot successfully construct an object.

If a constructor throws an exception, that object's destructor is not necessarily called. Destructors are called only for the base classes and for those objects that were fully constructed inside the classes since entering the try block.

Note: This does not apply to VCL base classes.

See Also