Class CErrorHandler::
ReportErrorOS()
Data ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: ReportErrorNext page: ReportStaticError    Show member index
Protected Function Declared in:
ErrorHandler.h

'Declaration' icon -- Shortcut to top of page. Declaration

virtual void ReportErrorOS(
    const std::string& rMethod,
    const std::string& rMessage) const;

'Description' icon -- Shortcut to top of page. Description

Report an error (Take the get last error)

'Function Body' icon -- Shortcut to top of page. Function Body

if (!GetLog())
    return;

try
{
    //Get the last error
    DWORD dwLastError;
    dwLastError=GetLastError();

    //Format the message
    std::string sMessage;
    sMessage=rMessage;
    sMessage+=", with error code: ";

    //Convert the error code
    char aTmp[11];
    itoa(dwLastError,aTmp,10);

    //Add it again
    sMessage+=aTmp;
    sMessage+=" ";
    sMessage+=ErrorCodeToString(dwLastError);

    //Get the log
    CErrorLog* pLog;
    pLog=GetLog();

    //Report to the log
    pLog->ReportError(m_sClassName,
                      rMethod,
                      sMessage);
}
ERROR_UNKNOWN("ReportErrorOS")

'See Also' icon -- Shortcut to top of page. See Also

Class Overview Class Overview  |  Hierarchy Chart Hierarchy Chart


Get Surveyor!This web site was generated using Surveyor V4.50.811.1.  Click here for more information. Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003.