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

look::DbError Class Reference

Error message class analogous to errno. More...

#include <dberror.h>

List of all members.

Static Public Methods

void FindLastErrorFromDb (void)
 Ask the interface layer what its last error was. More...

void SetLastError (const LookString &theMessage, long theNumber)
 Set the error message/number. More...

void AppendErrorMessage (const LookString &theMessage)
 Append an error message to an existing one. More...

LookString GetLastError (long &theErrorNumber)
 Get the last error message and number. More...

LookString GetLastErrorString (void)
 Get the last error message. More...

long GetLastErrorNumber (void)
 Get the last error number. More...


Static Protected Attributes

long itsLastErrorNo
LookString itsLastErrorMessage


Detailed Description

Error message class analogous to errno.

This class stores an error message and error number. When something goes wrong, ask it to tell you what it was. Error numbers are nominally reserved in looktypes.h.


Member Function Documentation

void look::DbError::AppendErrorMessage ( const LookString & theMessage ) [static]
 

Append an error message to an existing one.

If the error message is in many parts you may wish to append messages.

Parameters:
theMessage   The error message to append
Returns:
none

void look::DbError::FindLastErrorFromDb ( void ) [static]
 

Ask the interface layer what its last error was.

If a db interface layer call fails (eg DbConnect), this will query the interface layer for an appropriate error message and number. If you never touch the interface layer you don't need this call

Returns:
none

LookString look::DbError::GetLastError ( long & theErrorNumber ) [static]
 

Get the last error message and number.

Get the last error message and number.

Parameters:
theErrorNumber   Reference to long to receive the error number
Returns:
The error message

long look::DbError::GetLastErrorNumber ( void ) [static]
 

Get the last error number.

Get the last error number.

Returns:
The error number

LookString look::DbError::GetLastErrorString ( void ) [static]
 

Get the last error message.

Get the last error message.

Returns:
The error message

void look::DbError::SetLastError ( const LookString & theMessage,
long theNumber ) [static]
 

Set the error message/number.

Set the error message/number for your own errors, eg ones in liblookdb.

Parameters:
theMessage   The error message
theNumber   The error number
Returns:
none


The documentation for this class was generated from the following files:
Generated at Thu Jan 17 12:53:07 2002 for liblookdb by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001