Error Library
[Libraries]


Detailed Description

Created: 6th June 2006 Updated: 14th January 2007.

This library defines components that assist with error interpretation and handling.

Error Classes

The Error library currently includes the following classes:

Error Functions

The Error library currently includes the function suites:


Classes

class  SupportErrorInfoImpl
 Provides implementation of ISupportErrorInfo for support for errors on one interface. More...
class  SupportErrorInfoImpl2
 Provides implementation of ISupportErrorInfo for support for errors on two interfaces. More...
class  SupportErrorInfoImpl3
 Provides implementation of ISupportErrorInfo for support for errors on three interfaces. More...
class  SupportErrorInfoImpl4
 Provides implementation of ISupportErrorInfo for support for errors on four interfaces. More...
class  SupportErrorInfoImpl5
 Provides implementation of ISupportErrorInfo for support for errors on five interfaces. More...
class  bad_interface_cast
 Exception class thrown by the interface cast classes and functions when interface queries fail. More...
class  errorinfo_desc
 Provides access to the COM Error Info objecg. More...
class  com_exception
 General exception class for COM-related failures. More...
class  variant_type_exception
 Indicates variant type mismatches. More...
struct  exception_policy_base
 Policy adaptor template for exception throwing. More...
class  com_initialisation_exception
 Exception class thrown for COM initialisation failures. More...
struct  com_initialisation_exception_policy
 Exception policy whose action is to do nothing. More...
class  internet_exception
 General exception class for internet-related failures. More...
struct  throw_internet_exception_policy
 The policy class, which throws a internet_exception class. More...
class  basic_error_desc
 Class used for composing and decomposing file-system paths. More...
class  range_exception
 General exception class for RangeLib failures. More...
class  empty_range_exception
 Indicates that an operation requiring non-empty range was invoked on an empty range. More...
class  active_end_iterator_exhaustion
 An exception thrown when an active end iterator is exhausted. More...
class  contract_violation
 Thrown when a contract has been violated. More...
class  conversion_error_base
 Root. More...
class  conversion_error
 Represents a failed conversion. More...
class  errno_scope
 A scoping class that scopes the thread's last error. More...
class  basic_error_desc
 Utility class that loads the system string representation corresponding to a given error code. More...
class  external_iterator_invalidation
 An exception thrown when an active end iterator is exhausted. More...
class  iteration_interruption
 An exception thrown when an active iterator is interrupted, by the underlying range changing outside direct control by the current thread of execution. More...
class  os_exception
 Root exception class for sub-project platform-specific exceptions. More...
class  project_exception
 Root exception class for sub-project platform-specific exceptions. More...
struct  null_exception_policy
 The no-throwing exception policy. More...
struct  throw_exception_policy
 The throwing exception policy. More...
class  unrecoverable
 Unrecoverable exception class. More...
class  unix_exception
 General exception class for UNIX operating system failures. More...
struct  unix_exception_policy
 The NULL exception type. More...
class  conversion_error
 Represents a failed conversion. More...
class  basic_error_desc
 Utility class that loads the system string representation corresponding to a given error code. More...
class  windows_exception
 General exception class for Windows operating system failures. More...
class  resource_exception
 Indicates that a resource could not be located. More...
class  access_exception
 Indicates that a access condition was encountered. More...
struct  windows_exception_policy
 A policy class that throws a windows_exception class. More...
struct  resource_exception_policy
 A policy class that throws a resource_exception class. More...
class  last_error_scope
 A scoping class that scopes the thread's last error. More...

Typedefs

typedef exception_policy_base
< com_exception > 
com_exception_policy
 The policy class, which throws a com_exception class.
typedef exception_policy_base
< variant_type_exception > 
variant_type_exception_policy
 The policy class, which throws a com_exception class.
typedef
stlsoft::null_exception_policy 
ignore_initialisation_exception_policy
 Exception policy whose action is to do nothing.
typedef basic_error_desc< char > error_desc_a
 Specialisation of the basic_error_desc template for the multibyte character type char.
typedef basic_error_desc< wchar_t > error_desc_w
 Specialisation of the basic_error_desc template for the wide character type wchar_t.
typedef basic_error_desc< char > error_desc
 Specialisation of the basic_error_desc template for the character type char.
typedef null_exception_policy nothrow_exception_policy
 Alternative typedef for null_exception_policy.
typedef basic_error_desc< char > error_desc_a
 Specialisation of the basic_error_desc template for the ANSI character type char.
typedef basic_error_desc< wchar_t > error_desc_w
 Specialisation of the basic_error_desc template for the Unicode character type wchar_t.
typedef basic_error_desc< TCHAR > error_desc
 Specialisation of the basic_error_desc template for the Win32 character type TCHAR.

Functions

STLSOFT_INLINE HRESULT comstl__set_error_info_description_w (wchar_t const *description)
 [C only] Sets the description of the current error object to the given Unicode string
STLSOFT_INLINE HRESULT comstl__set_error_info_description_a (char const *description)
 [C only] Sets the description of the current error object to the given ANSI string
STLSOFT_INLINE HRESULT comstl__set_error_info_description_and_source_w (wchar_t const *description, wchar_t const *source)
 [C only] Sets the description and source of the current error object to the given Unicode strings
STLSOFT_INLINE HRESULT comstl__set_error_info_description_and_source_a (char const *description, char const *source)
 [C only] Sets the description and source of the current error object to the given ANSI strings
STLSOFT_INLINE HRESULT comstl__set_error_info_w (wchar_t const *description, wchar_t const *source, REFGUID guid, wchar_t const *helpFile, cs_dword_t helpContext)
 [C only] Sets the description, source, interface ID and help information of the current error object
STLSOFT_INLINE HRESULT comstl__set_error_info_a (char const *description, char const *source, REFGUID guid, char const *helpFile, cs_dword_t helpContext)
 [C only] Sets the description, source, interface ID and help information of the current error object
HRESULT set_error_info (char const *description)
 Sets the description of the current error object to the given ANSI string.
HRESULT set_error_info (wchar_t const *description)
 Sets the description of the current error object to the given Unicode string.
HRESULT set_error_info (char const *description, char const *source)
 Sets the description and source of the current error object to the given ANSI string.
HRESULT set_error_info (wchar_t const *description, wchar_t const *source)
 Sets the description and source of the current error object to the given Unicode string.
HRESULT set_error_info (char const *description, char const *source, REFGUID guid)
 Sets the description, source and GUID of the current error object to the given ANSI string.
HRESULT set_error_info (wchar_t const *description, wchar_t const *source, REFGUID guid)
 Sets the description, source and GUID of the current error object to the given Unicode string.
void EXCEPINFO_free (EXCEPINFO *pxi)
 Releases the resources associated with the EXCEPINFO instance.
STLSOFT_INLINE ws_dword_t winstl__format_message_buff_inst_a (DWORD error, HINSTANCE hinst, char *buffer, ws_uint_t cchBuffer)
 Translates the given error to an error string and.
STLSOFT_INLINE ws_dword_t winstl__format_message_buff_inst_w (DWORD error, HINSTANCE hinst, wchar_t *buffer, ws_uint_t cchBuffer)
STLSOFT_INLINE ws_dword_t winstl__format_message_buff_a (DWORD error, char *buffer, ws_uint_t cchBuffer)
STLSOFT_INLINE ws_dword_t winstl__format_message_buff_w (DWORD error, wchar_t *buffer, ws_uint_t cchBuffer)
STLSOFT_INLINE ws_dword_t winstl__format_message_alloc_a (DWORD error, HINSTANCE hinst, char **buffer)
STLSOFT_INLINE ws_dword_t winstl__format_message_alloc_w (DWORD error, HINSTANCE hinst, wchar_t **buffer)
STLSOFT_INLINE void winstl__format_message_free_buff_a (char *buffer)
STLSOFT_INLINE void winstl__format_message_free_buff_w (wchar_t *buffer)
ws_dword_t format_message (ws_dword_t error, HINSTANCE hinst, char *buffer, ws_uint_t cchBuffer)
ws_dword_t format_message (ws_dword_t error, HINSTANCE hinst, wchar_t *buffer, ws_uint_t cchBuffer)
ws_dword_t format_message (ws_dword_t error, char *buffer, ws_uint_t cchBuffer)
ws_dword_t format_message (ws_dword_t error, wchar_t *buffer, ws_uint_t cchBuffer)
ws_dword_t format_message (ws_dword_t error, HINSTANCE hinst, char **buffer)
ws_dword_t format_message (ws_dword_t error, HINSTANCE hinst, wchar_t **buffer)
void format_message_free_buff (char *buffer)
void format_message_free_buff (wchar_t *buffer)


Typedef Documentation

typedef exception_policy_base<com_exception> com_exception_policy

The policy class, which throws a com_exception class.

typedef basic_error_desc<TCHAR> error_desc

typedef basic_error_desc<char> error_desc

Specialisation of the basic_error_desc template for the character type char.

typedef basic_error_desc< char > error_desc_a

typedef basic_error_desc< char > error_desc_a

Specialisation of the basic_error_desc template for the multibyte character type char.

typedef basic_error_desc< wchar_t > error_desc_w

Specialisation of the basic_error_desc template for the Unicode character type wchar_t.

typedef basic_error_desc< wchar_t > error_desc_w

Specialisation of the basic_error_desc template for the wide character type wchar_t.

typedef stlsoft:: null_exception_policy ignore_initialisation_exception_policy

Exception policy whose action is to do nothing.

typedef null_exception_policy nothrow_exception_policy

Alternative typedef for null_exception_policy.

typedef exception_policy_base<variant_type_exception> variant_type_exception_policy

The policy class, which throws a com_exception class.


Function Documentation

STLSOFT_INLINE HRESULT comstl__set_error_info_a ( char const *  description,
char const *  source,
REFGUID  guid,
char const *  helpFile,
cs_dword_t  helpContext 
)

[C only] Sets the description, source, interface ID and help information of the current error object

See also:
comstl::set_error_info

References COMSTL_MESSAGE_ASSERT, and COMSTL_REF_2_PTR.

STLSOFT_INLINE HRESULT comstl__set_error_info_description_a ( char const *  description  ) 

[C only] Sets the description of the current error object to the given ANSI string

See also:
comstl::set_error_info_description

References COMSTL_MESSAGE_ASSERT.

Referenced by comstl::set_error_info().

STLSOFT_INLINE HRESULT comstl__set_error_info_description_and_source_a ( char const *  description,
char const *  source 
)

[C only] Sets the description and source of the current error object to the given ANSI strings

See also:
comstl::set_error_info_description_and_source

References COMSTL_MESSAGE_ASSERT.

Referenced by comstl::set_error_info().

STLSOFT_INLINE HRESULT comstl__set_error_info_description_and_source_w ( wchar_t const *  description,
wchar_t const *  source 
)

[C only] Sets the description and source of the current error object to the given Unicode strings

See also:
comstl::set_error_info_description_and_source

References COMSTL_MESSAGE_ASSERT.

Referenced by comstl::set_error_info().

STLSOFT_INLINE HRESULT comstl__set_error_info_description_w ( wchar_t const *  description  ) 

[C only] Sets the description of the current error object to the given Unicode string

See also:
comstl::set_error_info_description

References COMSTL_MESSAGE_ASSERT.

Referenced by comstl::set_error_info().

STLSOFT_INLINE HRESULT comstl__set_error_info_w ( wchar_t const *  description,
wchar_t const *  source,
REFGUID  guid,
wchar_t const *  helpFile,
cs_dword_t  helpContext 
)

[C only] Sets the description, source, interface ID and help information of the current error object

See also:
comstl::set_error_info

References COMSTL_MESSAGE_ASSERT, and COMSTL_REF_2_PTR.

void comstl::EXCEPINFO_free ( EXCEPINFO *  pxi  )  [inline]

Releases the resources associated with the EXCEPINFO instance.

HRESULT comstl::set_error_info ( wchar_t const *  description,
wchar_t const *  source,
REFGUID  guid 
) [inline]

Sets the description, source and GUID of the current error object to the given Unicode string.

Parameters:
description The error description
source The error source
guid The GUID of the interface in error

HRESULT comstl::set_error_info ( char const *  description,
char const *  source,
REFGUID  guid 
) [inline]

Sets the description, source and GUID of the current error object to the given ANSI string.

Parameters:
description The error description
source The error source
guid The GUID of the interface in error

HRESULT comstl::set_error_info ( wchar_t const *  description,
wchar_t const *  source 
) [inline]

Sets the description and source of the current error object to the given Unicode string.

Parameters:
description The error description
source The error source

References comstl__set_error_info_description_and_source_w().

HRESULT comstl::set_error_info ( char const *  description,
char const *  source 
) [inline]

Sets the description and source of the current error object to the given ANSI string.

Parameters:
description The error description
source The error source

References comstl__set_error_info_description_and_source_a().

HRESULT comstl::set_error_info ( wchar_t const *  description  )  [inline]

Sets the description of the current error object to the given Unicode string.

Parameters:
description The error description

References comstl__set_error_info_description_w().

HRESULT comstl::set_error_info ( char const *  description  )  [inline]

Sets the description of the current error object to the given ANSI string.

References comstl__set_error_info_description_a().

STLSOFT_INLINE ws_dword_t winstl__format_message_buff_inst_a ( DWORD  error,
HINSTANCE  hinst,
char *  buffer,
ws_uint_t  cchBuffer 
)

Translates the given error to an error string and.

References stlsoft_static_cast, and WINSTL_ASSERT.


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