Class CErrorHandler Data ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: Custom Code in Source After IncludesNext page: m_pLocalLog    Show member index
Class Declared in:
ErrorHandler.h

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

Copyright (c) 2000-2003 Barak Weichselbaum <barak@komodia.com> All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS `AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Contact info:

Site:                  http://www.komodia.com Main contact:          barak@komodia.com For custom projects, consulting, or other paid services:         sales@komodia.com

Hierarchy Chart Hierarchy Chart

'Data Items' icon -- Shortcut to top of page. Data Items

Private data CErrorLog * m_pLocalLog If we have a local log
Private data static CErrorLog * m_pLog CErrorLog end
Private data mutable std::string m_sClassName Our class name

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

Public constructor

CErrorHandler()

Ctor and Dtor
Public constructor

CErrorHandler( const CErrorHandler& rHandler )

Private constructor

CErrorLog::CErrorLog()

Private constructor

CErrorLog::CErrorLog( const CErrorLog& rLog )

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

Public destructor virtual

~CErrorHandler()

Private destructor

CErrorLog::~CErrorLog()

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

Private function BOOL

CErrorLog::GetAutoFlush() const

Private function CErrorHandler::CErrorLog &

CErrorLog::operator =( const CErrorLog& rLog )

Private function void

CErrorLog::SetAutoFlush( BOOL bFlush )

Public function static std::string

ErrorCodeToString( DWORD dwErrorCode )

Convert an error code to string
Protected function const std::string &

GetClassName() const

Get the name of the current class
Public function static std::string

GetCurrentDateTime()

Get a formated time and date
Private function CErrorHandler::CErrorLog *

GetLog() const

Get the correct log (global or local)
Protected function virtual void

ReportError( const std::string& rMethod ) const

Report an unknown error (use GetLastError)
Protected function virtual void

ReportError( const std::string& rMethod, const std::string& rMessage ) const

Report an error
Protected function virtual void

ReportError( const std::string& rMethod, const std::string& rMessage, DWORD dwAdditionalData ) const

Report an error
Protected function virtual void

ReportError( const std::string& rMethod, int iErrorCode ) const

Report an error, with socket error
Protected function virtual void

ReportError( const std::string& rMethod, const std::string& rMessage, int iErrorCode ) const

Report an error, with socket error
Protected function virtual void

ReportErrorOS( const std::string& rMethod, const std::string& rMessage ) const

Report an error (Take the get last error)
Protected function static void

ReportStaticError( const std::string& rClass, const std::string& rMethod )

Report an unknown error (use GetLastError)
Protected function static void

ReportStaticError( const std::string& rClass, const std::string& rMethod, const std::string& rMessage )

Report an error
Protected function static void

ReportStaticError( const std::string& rClass, const std::string& rMethod, const std::string& rMessage, DWORD dwAdditionalData )

Report an error
Public function void

SetLocalLog( CErrorLog* pLog )

Set the local log (will be used in current class only)
Public function static void

SetLog( CErrorLog* pLog )

Set the global log
Protected function void

SetName( const std::string& rName ) const

Set the name of the current class
Protected function void

WriteMessage( const std::string& rMethod, const std::string& rMessage, LogPriority aPriority=lpMessage )

Write a message
Protected function void

WriteMessage( const std::string& rMethod, const std::string& rMessage, DWORD dwAdditionalData, LogPriority aPriority=lpMessage )

Write a message
Protected function static void

WriteStaticMessage( const std::string& rClass, const std::string& rMethod, const std::string& rMessage, LogPriority aPriority=lpMessage )

Write a message
Protected function static void

WriteStaticMessage( const std::string& rClass, const std::string& rMethod, const std::string& rMessage, DWORD dwAdditionalData, LogPriority aPriority=lpMessage )

Write a message

'Custom Code' icon -- Shortcut to top of page. Custom Code

'Implementation Details' icon -- Shortcut to top of page. Implementation Details

File(s)
C:\dev\Komodia\ErrorHandler.cpp
C:\dev\Komodia\ErrorHandler.h
Header Includes
KomodiaSettings.h     
string     
Source Includes
stdafx.h     for precompiled header directive
ErrorHandler.h     
ErrorHandlerMacros.h     
assert.h     
time.h     
Owner
tcpip4
Last Modified
12/02/2003 17:10:02 PM

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.