C++ Client API 1.4 (November 2023)
 
Loading...
Searching...
No Matches
dbSpaces::error::ReportError Class Reference

#include <Cerr_ReportError.h>

Public Member Functions

 ReportError ()
 
 ReportError (const ReportError &)
 
virtual ~ReportError ()
 
const ReportErroroperator= (const ReportError &)
 
bool operator== (ReportError &)
 
bool operator!= (ReportError &)
 
bool operator< (ReportError &)
 
ReportErrorDuplicate ()
 
virtual dtRtnStatus ErrorPassthrough (dtSTRING const *, dtSMALL, dtSMALL, dtSTRING const *,...)
 
dtSMALL GetErrorCode ()
 
dtSMALL GetErrorLevel ()
 
dtSTRING const * GetErrorLocation ()
 
dtSTRING const * GetErrorMessage ()
 
ReportErrorGetErrorState ()
 
dtRtnStatus GetErrorStatus ()
 
const dtBOOLEAN HasError ()
 
const dtBOOLEAN IsErrorLoggingEnabled ()
 
void ResetError ()
 
void SetErrorCode (dtSMALL)
 
void SetErrorLevel (dtSMALL)
 
void SetErrorLocation (dtSTRING const *)
 
void SetErrorLoggingEnabled (const dtBOOLEAN)
 
void SetErrorMessage (dtSTRING const *,...)
 
void SetErrorMessage (std::string const)
 
void SetErrorState (const ReportError *)
 
void SetErrorState (const ReportError &)
 
void SetErrorStatus (dtRtnStatus)
 

Detailed Description

Simple class to help with reporting errors. It will usually be publicly derived from, and used as the implementation of SetErrorText, Error, etc methods.

A class that wishes to hold an error message and error code without reporting errors directly can use this class but should not call the error/passthrough methods, or report error.

Constructor & Destructor Documentation

◆ ReportError() [1/2]

dbSpaces::error::ReportError::ReportError ( )

ReportError default constructor.

Since
Version 1.0

◆ ReportError() [2/2]

dbSpaces::error::ReportError::ReportError ( const ReportError )

ReportError constructor using an existing ReportError object.

Since
Version 1.0

◆ ~ReportError()

virtual dbSpaces::error::ReportError::~ReportError ( )
virtual

ReportError destructor.

Since
Version 1.0

Member Function Documentation

◆ Duplicate()

ReportError * dbSpaces::error::ReportError::Duplicate ( )

Get a new ReportError object.

Returns
new ReportError object.
Since
Version 1.0

◆ ErrorPassthrough()

virtual dtRtnStatus dbSpaces::error::ReportError::ErrorPassthrough ( dtSTRING const *  ,
dtSMALL  ,
dtSMALL  ,
dtSTRING const *  ,
  ... 
)
virtual

As Error(), but takes a va_list from a method that took '...' itself.

Since
Version 1.0

◆ GetErrorCode()

dtSMALL dbSpaces::error::ReportError::GetErrorCode ( )

Get the error code for the ReportError object.

Returns
error code.
Since
Version 1.0

◆ GetErrorLevel()

dtSMALL dbSpaces::error::ReportError::GetErrorLevel ( )

Get the error level for the ReportError object.

Returns
error level.
Since
Version 1.0

◆ GetErrorLocation()

dtSTRING const * dbSpaces::error::ReportError::GetErrorLocation ( )

Get the error location for the ReportError object.

Returns
error location.
Since
Version 1.0

◆ GetErrorMessage()

dtSTRING const * dbSpaces::error::ReportError::GetErrorMessage ( )

Get the error message for the ReportError object.

Returns
error message.
Since
Version 1.0

◆ GetErrorState()

ReportError * dbSpaces::error::ReportError::GetErrorState ( )

Get this ReportError object.

Returns
ReportError object.
Since
Version 1.0

◆ GetErrorStatus()

dtRtnStatus dbSpaces::error::ReportError::GetErrorStatus ( )

Get the error status for the ReportError object.

Returns
error status.
Since
Version 1.0

◆ HasError()

const dtBOOLEAN dbSpaces::error::ReportError::HasError ( )

Check if the ReportError object has an error state.

Returns
true if in an error state.
Since
Version 1.0

◆ IsErrorLoggingEnabled()

const dtBOOLEAN dbSpaces::error::ReportError::IsErrorLoggingEnabled ( )

Is error logging to the system log enabled?

@retrun TRUE if enabled, otherwise FALSE.

Since
Version 1.0

◆ operator!=()

bool dbSpaces::error::ReportError::operator!= ( ReportError )

Not equals operator Checks if the error codes are not the same.

Since
Version 1.0

◆ operator<()

bool dbSpaces::error::ReportError::operator< ( ReportError )

Less than operator Checks if the error codes are less than each other.

Since
Version 1.0

◆ operator=()

const ReportError & dbSpaces::error::ReportError::operator= ( const ReportError )

Assignment operator

Since
Version 1.0

◆ operator==()

bool dbSpaces::error::ReportError::operator== ( ReportError )

Equals operator Checks if the error codes are the same.

Since
Version 1.0

◆ ResetError()

void dbSpaces::error::ReportError::ResetError ( )

Clear the error to an non-error state.

Since
Version 1.0

◆ SetErrorCode()

void dbSpaces::error::ReportError::SetErrorCode ( dtSMALL  )

Set the error code for the ReportError object.

Parameters
errorCode- the error code.
Since
Version 1.0

◆ SetErrorLevel()

void dbSpaces::error::ReportError::SetErrorLevel ( dtSMALL  )

Set the error level for the ReportError object.

Parameters
errorLevel- the error level.
Since
Version 1.0

◆ SetErrorLocation()

void dbSpaces::error::ReportError::SetErrorLocation ( dtSTRING const *  )

Set the error location for the ReportError object.

Parameters
errorLocation- the error location.
Since
Version 1.0

◆ SetErrorLoggingEnabled()

void dbSpaces::error::ReportError::SetErrorLoggingEnabled ( const  dtBOOLEAN)

Set whether errors are written to the system log. The default is enabled.

Parameters
state- TRUE or FALSE.
Since
Version 1.0

◆ SetErrorMessage() [1/2]

void dbSpaces::error::ReportError::SetErrorMessage ( dtSTRING const *  ,
  ... 
)

Set the error message for the ReportError object.

Parameters
errorMessage- the error message format string.
argPtr- variable argument list.
Since
Version 1.0

◆ SetErrorMessage() [2/2]

void dbSpaces::error::ReportError::SetErrorMessage ( std::string const  )

Set the error message for the ReportError object.

Parameters
errorMessage- the error message.
Since
Version 1.0

◆ SetErrorState() [1/2]

void dbSpaces::error::ReportError::SetErrorState ( const ReportError )

Set the error state using another ReportError object.

Parameters
errorState- the ReportError object.
Since
Version 1.0

◆ SetErrorState() [2/2]

void dbSpaces::error::ReportError::SetErrorState ( const ReportError )

Set the error state using another ReportError object.

Parameters
error- the ReportError object
Since
Version 1.0

◆ SetErrorStatus()

void dbSpaces::error::ReportError::SetErrorStatus ( dtRtnStatus  )

Set the error status for the ReportError object.

Parameters
errorStatus- the error status.
Since
Version 1.0