CFugue
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Err::CErrReporter Class Reference

Public Types

enum  ErrReportingMode { Mode_MessageBox, Mode_OutputDebugString }
 

Public Member Functions

 CErrReporter (ErrReportingMode Mode=Mode_OutputDebugString)
 
 CErrReporter (LPCTSTR lpszErrMsg, ErrReportingMode Mode=Mode_OutputDebugString)
 
 CErrReporter (const CErrReporter &other)
 
ErrReportingMode & ReportingMode ()
 Gets/Sets the Error Reporting Mode.
 
LPCTSTR CollectErrorDetails (DWORD dwErrorCode=GetLastError())
 Collects and Formats the Error Message for the last error.
 
void ReportLastError ()
 
void ReportError (DWORD dwErrorCode)
 
void ReportError (LPCTSTR lpszErrMsg)
 
void ReportError () const
 Reports the ErrorMessage that was set with SetErrorMessage.
 
void Clear ()
 Clears the Error Message Buffer.
 
void SetErrorMessage (LPCTSTR lpszErrMsg)
 Sets the Error Message.
 
LPCTSTR GetErrorMessage () const
 Returns the last Set Error Message.
 
 operator LPCTSTR () const
 
CErrReporteroperator= (const CErrReporter &other)
 

Protected Member Functions

void ErrorMessage (LPCTSTR lpszErrMsg) const
 Displays the given Error Message with MessageBox.
 

Protected Attributes

ErrReportingMode m_ReportingMode
 

Friends

void ErrorMessage (LPCTSTR lpszErrMsg)
 Displays or DebugPrints the given Error Message.
 

Detailed Description

Definition at line 23 of file ErrorReporter.h.

Member Function Documentation

void Err::CErrReporter::ReportError ( DWORD  dwErrorCode)

Displays or DebugPrints the Error Message for the given error code. Equivalent to ReportLastError() when dwErrorCode == GetLastError();

Definition at line 82 of file ErrorReporter.h.

References CollectErrorDetails(), and ReportError().

void Err::CErrReporter::ReportError ( LPCTSTR  lpszErrMsg)

Sets and Displays or DebugPrints the supplied Error Message. Useful for displaying custom messages.

Definition at line 90 of file ErrorReporter.h.

References ReportError(), and SetErrorMessage().

void Err::CErrReporter::ReportLastError ( )

Displays or DebugPrints the Error Message for the last error (Uses GetLastError() API). Also Sets the Error Message;

Definition at line 75 of file ErrorReporter.h.

References ReportError().


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

CFugue, the C++ Music Programming Library © Copyright 2009 Cenacle Research India Private Limited Gopalakrishna Palem