GizmoDistribution

gzDistError Class Reference

Encapsulates error information. More...

#include <gzDistError.h>

List of all members.

Public Member Functions

 gzDistError ()
 Default constructor.
 gzDistError (const gzDistErrorCode &code, const gzDistErrorLevel &level)
 Constructor.
 gzDistError (const gzDistErrorCode &code, const gzDistErrorLevel &level, const gzString &additional)
 Constructor.
 gzDistError (const gzDistError &orig)
 Copy constructor.
virtual ~gzDistError ()
 Destructor.
gzDistErroroperator= (const gzDistError &rhs)
 Assignment operator.
gzVoid setError (const gzDistErrorCode &code, const gzDistErrorLevel &level)
 Set error.
gzVoid setError (const gzDistErrorCode &code, const gzDistErrorLevel &level, const gzString &additional)
 Set error.
gzVoid resetError ()
 Reset error code and level.
gzBool hasError () const
 Is this an error?
 operator gzBool () const
 Is this an error?
gzDistErrorCode getErrorCode () const
 Get the error code.
gzDistErrorLevel getErrorLevel () const
 Get the error level.
gzBool operator== (const gzDistErrorCode &rhsCode) const
 Equal to (error code) operator.
gzBool operator!= (const gzDistErrorCode &rhsCode) const
 Not equal to (error code) operator.
const gzString & getErrorString () const
 Get error string.
gzString getAdditionalString () const
 Get additional error string.
gzBool hasAdditionalString () const
 Has additional error string?
gzVoid reportError () const
 Report error.


Detailed Description

Encapsulates error information.

Stores error code (gzDistErrorCode) and error level (gzDistErrorLevel). An additional error description string can also be supplied. The last error is stored per thread.

See also:
gzDistSetLastError

gzDistGetLastError

gzDistReportLastError

gzDistClearLastError

Examples:

tcp.cpp.

Definition at line 169 of file gzDistError.h.


Constructor & Destructor Documentation

gzDistError::gzDistError  ) 
 

Default constructor.

The error code is set to GZ_DIST_NO_ERROR and the error level is set to GZ_DIST_ERROR_OK.

gzDistError::gzDistError const gzDistErrorCode code,
const gzDistErrorLevel level
 

Constructor.

Parameters:
code The error type code.
level The error level.

gzDistError::gzDistError const gzDistErrorCode code,
const gzDistErrorLevel level,
const gzString &  additional
 

Constructor.

Parameters:
code The error type code.
level The error level.
additional Additional error string.


Member Function Documentation

gzVoid gzDistError::setError const gzDistErrorCode code,
const gzDistErrorLevel level
 

Set error.

Parameters:
code The error type code.
level The error level.

gzVoid gzDistError::setError const gzDistErrorCode code,
const gzDistErrorLevel level,
const gzString &  additional
 

Set error.

Parameters:
code The error type code.
level The error level.
additional Additional error string (optional).

gzDistError::operator gzBool  )  const
 

Is this an error?

The same as hasError().


The documentation for this class was generated from the following file:
Documentation for GizmoDistribution generated at Wed Feb 20 11:59:22 2008 by   Saab Training Systems AB, ¸ (c) 2003-and beyond