GizmoDistribution

gzDistError.h File Reference

Definition of errors in GizmoDistribution. More...

#include "gzDistBase.h"

Go to the source code of this file.

Classes

class  gzDistError
 Encapsulates error information. More...

Enumerations

enum  gzDistErrorCode
 gzDistError error codes.
enum  gzDistErrorLevel {
  GZ_DIST_ERROR_DEBUG = 0,
  GZ_DIST_ERROR_NOTICE,
  GZ_DIST_ERROR_WARNING,
  GZ_DIST_ERROR_FATAL
}
 gzDistError error levels More...

Functions

gzVoid gzDistReportLastError (gzBool clear=FALSE)
 Report the last error for the current thread.
gzDistError gzDistGetLastError (gzBool clear=FALSE)
 Get the last error for the current thread.
gzVoid gzDistSetLastError (const gzDistErrorCode &code, const gzDistErrorLevel &level)
 Set the last gzDistError for the current thread.
gzVoid gzDistSetLastError (const gzDistErrorCode &code, const gzDistErrorLevel &level, const gzString &additional)
 Set the last gzDistError for the current thread.
gzVoid gzDistSetLastError (const gzDistError &error)
 Set the last gzDistError for the current thread.
gzVoid gzDistClearLastError ()
 Clear the last error for the current thread.
gzVoid gzDistClearAllErrors ()
 Clear the last error for all threads.

Variables

const gzDistError GZ_DIST_OK (GZ_DIST_NO_ERROR, GZ_DIST_ERROR_NOTICE)
 Definition of the default OK (not really an error).


Detailed Description

Definition of errors in GizmoDistribution.

The class gzDistError encapsulates error information. The last error is stored per thread. The functions gzDistSetLastError, gzDistGetLastError, gzDistReportLastError and gzDistClearLastError are used for handling the last error in the current thread.

Definition in file gzDistError.h.


Enumeration Type Documentation

enum gzDistErrorLevel
 

gzDistError error levels

Enumerator:
GZ_DIST_ERROR_DEBUG  Debug information.
GZ_DIST_ERROR_NOTICE  Just a notice.
GZ_DIST_ERROR_WARNING  This is no good, but not fatal.
GZ_DIST_ERROR_FATAL  This is fatal to the application.

Definition at line 133 of file gzDistError.h.


Function Documentation

gzVoid gzDistReportLastError gzBool  clear = FALSE  ) 
 

Report the last error for the current thread.

Parameters:
clear Clear the last error.
Examples:
evaluators.cpp, and tcp.cpp.

gzDistError gzDistGetLastError gzBool  clear = FALSE  ) 
 

Get the last error for the current thread.

Parameters:
clear Clear the last error.
Examples:
tcp.cpp.

gzVoid gzDistSetLastError const gzDistErrorCode code,
const gzDistErrorLevel level
 

Set the last gzDistError for the current thread.

Returns:
Returns the previous gzDistError.
Parameters:
code The new last error code.
level The new last error level.

gzVoid gzDistSetLastError const gzDistErrorCode code,
const gzDistErrorLevel level,
const gzString &  additional
 

Set the last gzDistError for the current thread.

Returns:
Returns the previous gzDistError.
Parameters:
code The new last error code.
level The new last error level.
additional Additional information string (optional).

gzVoid gzDistSetLastError const gzDistError error  ) 
 

Set the last gzDistError for the current thread.

Returns:
Returns the previous error.
Parameters:
error The new last error.

gzVoid gzDistClearAllErrors  ) 
 

Clear the last error for all threads.

Called from gzDistManager at shutdown.


Documentation for GizmoDistribution generated at Wed Feb 20 11:59:21 2008 by   Saab Training Systems AB, ¸ (c) 2003-and beyond