Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ZE::ZError Class Reference

#include <ZE_ZError.h>

List of all members.


Detailed Description

ZError class for storing and printing information on errors. Inherited from ZObject and tied closely to ZEngine.
Since:
0.8.2


Public Member Functions

 ZError (ZErrorCode code=ZERR_NONE, std::string desc="", std::string file="", int line=0)
 Default constructor for ZError.

void Create (ZErrorCode code, std::string desc="", std::string file="", int line=0)
 Set members of error object.

ZErrorCode Code () const
 Get ZErrorCode of error.

std::string LogString () const
 Get formatted string for log file.


Static Public Member Functions

void CreateStringTable ()
 Construct string table for error strings.


Protected Attributes

ZErrorCode rCode
 Error ID.

std::string rDescription
 Error Description.

std::string rFilename
 File which error occured in.

unsigned int rLine
 Line which error occured on.


Static Protected Attributes

std::string sErrorDesc [ZERR_LAST]
 Static Array of Error Identifiers.


Constructor & Destructor Documentation

ZE::ZError::ZError ZErrorCode  code = ZERR_NONE,
std::string  desc = "",
std::string  file = "",
int  line = 0
 

Make new ZError object, by default set rCode to ZERR_NONE with no description.

Parameters:
code ZErrorCode to set object to, defaults to ZERR_NONE.
desc Description to use for object, defaults to nothing.
file Optional argument specifying the file the error occured in.
line Optional argument specifying the line the error occured on.


Member Function Documentation

void ZE::ZError::CreateStringTable  )  [static]
 

Constructs a string table for errors, enabling ZEngine to properly delete the table on exit.

void ZE::ZError::Create ZErrorCode  code,
std::string  desc = "",
std::string  file = "",
int  line = 0
 

Set new values in ZError object.

Parameters:
code ZErrorCode to set object to.
desc Description to use for object, defaults to nothing.
file Optional argument specifying the file the error occured in.
line Optional argument specifying the line the error occured on.

ZErrorCode ZE::ZError::Code  )  const
 

Access ZErrorCode of the ZError object.

Returns:
The error ZErrorCode.

std::string ZE::ZError::LogString  )  const
 

Return the string to be written to the logfile. Called by ZEngine in LogError.


The documentation for this class was generated from the following files:
Generated on Sun Oct 5 19:34:46 2003 for ZEngine by doxygen1.3