Provide an exception class for unexternalization operations.
More...
Namespaces |
namespace | bslx |
Detailed Description
- Outline
-
-
- Purpose:
- Provide an exception class for unexternalization operations.
-
- Classes:
-
- See also:
- Component bslx_testinstream
-
- Description:
- This component defines a simple exception object for testing exceptions during unexternalization operations. The exception object
bslx::TestInStreamException
contains information about an unexternalization request, which can be queried by the "catcher" of the exception.
-
- Usage:
- This section illustrates intended use of this component.
-
- Example 1: Throw and Catch:
- In the following example, the
bslx::TestInStreamException
object is thrown, caught, and examined. First, set up a try
block and throw the exception with the indication that the exception occurred during unexternalization of an unsigned int
: Then, catch the exception and verify the indicated cause of the exception: