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 Methods

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

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

ZErrorCode Code () const
 Get ZErrorCode of error.

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


Protected Attributes

ZErrorCode rCode
 Error ID.

string rDescription
 Error Description.

string rFilename
 File which error occured in.

unsigned int rLine
 Line which error occured on.


Static Protected Attributes

string sErrorDesc [ZERR_LAST]
 Static Array of Error Identifiers.


Constructor & Destructor Documentation

ZE::ZError::ZError ZErrorCode    code = ZERR_NONE,
string    desc = "",
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::Create ZErrorCode    code,
string    desc = "",
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.

string ZE::ZError::LogString   const
 

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


Member Data Documentation

string ZE::ZError::sErrorDesc [static, protected]
 

Initial value:

 
{
    "No Error. [%s]",
    "SDL Error. [%s]",
    "Error Initializing SDL: %s", "Error Initializing SDL_mixer: %s", "Error Initializing SDL_ttf: %s",
    "Error Creating Display: %s",
    "Failed to load Image: %s", "Failed to load Sound: %s", "Failed to load Music: %s", "Failed to load Font: %s", 
    "Called ZImage::%s with no Image loaded.", "Called ZSound::%s with no Sound loaded.", 
    "Called ZMusic::%s with no Music loaded.", "Called ZFont::%s with no Font loaded."
}


The documentation for this class was generated from the following files:
Generated on Sat Jan 18 17:53:20 2003 for ZEngine by doxygen1.3-rc2