com_exception Class Reference
[Error Library]

#include <comstl/error/exceptions.hpp>

Inheritance diagram for com_exception:

project_exception clone_failure com_initialisation_exception variant_type_exception

List of all members.


Detailed Description

General exception class for COM-related failures.
Examples:

by_project/comstl/comstl.cpp.


Types

typedef com_exception class_type
 The type of the current instantiation.
typedef stlsoft::project_exception parent_class_type
 The parent type.

Public Member Functions

Construction
 com_exception (HRESULT hr)
 Constructs an instance from the given result code.
 com_exception (char const *reason, HRESULT hr)
 Constructs an instance from the given message string and result code.
virtual ~com_exception () throw ()
 Destructor.
Accessors
virtual char const * what () const throw ()
 Returns a human-readable string describing the exception condition.
HRESULT get_hr () const
 The error code associated with the exception.
HRESULT hr () const
 [DEPRECATED]

Member Typedef Documentation

The type of the current instantiation.

Reimplemented from project_exception.

Reimplemented in clone_failure, variant_type_exception, and com_initialisation_exception.

typedef stlsoft:: project_exception parent_class_type

The parent type.

Reimplemented from project_exception.

Reimplemented in clone_failure, variant_type_exception, and com_initialisation_exception.


Constructor & Destructor Documentation

com_exception ( HRESULT  hr  )  [inline, explicit]

Constructs an instance from the given result code.

Parameters:
hr The result code associated with the exception

com_exception ( char const *  reason,
HRESULT  hr 
) [inline]

Constructs an instance from the given message string and result code.

Parameters:
reason The message code associated with the exception
hr The result code associated with the exception

virtual ~com_exception (  )  throw () [inline, virtual]

Destructor.

Note:
This does not do have any implementation, but is required to placate the Comeau and GCC compilers, which otherwise complain about mismatched exception specifications between this class and its parent


Member Function Documentation

virtual char const* what (  )  const throw () [inline, virtual]

Returns a human-readable string describing the exception condition.

Implements project_exception.

Reimplemented in clone_failure.

Examples:
by_project/comstl/comstl.cpp.

HRESULT get_hr (  )  const [inline]

The error code associated with the exception.

HRESULT hr (  )  const [inline]

[DEPRECATED]

Deprecated:
Use get_hr() instead


The documentation for this class was generated from the following file:

Generated on Thu Jun 10 08:58:26 2010 for STLSoft by  doxygen 1.5.6