Err Class Reference

Abstract class provides a foundation exception object for CalcLib software. More...

#include <Base.h>

Inherited by ChebErr, IntgErr, IntpErr, MtxErr, and OdeErr.

Inheritance diagram for Err:

Inheritance graph
[legend]
List of all members.

Public Member Functions

const char * getClass (void) const
const char * getDescription (void) const
int getIndex (void) const
const char * getLibrary (void) const
const char * getNamespace (void) const

Static Public Attributes

static const char *const DEF_CLASS = "????"
static const char *const DEF_MESSAGE = "execution error"
static const char *const LIB_NAME = "CalcLib"
static const char *const LIB_NSPACE = "calc"

Protected Member Functions

 Err (const Err &er)
 Err (int indErr, const char *strCls, const char *strDsc)
 Err (void)
bool setError (int indErr, const char *strCls, const char *strDsc)
bool setError (const char *strCls, const char *strDsc)
bool setError (int indErr)
 ~Err (void)

Friends

std::ostream & operator<< (std::ostream &ostr, const Err &er)

Detailed Description

Abstract class provides a foundation exception object for CalcLib software.

Object instantiation of this class should be made only through classes which inherit this class.

Author
efgeorge
Date
2006/07/19 13:21:43
Revision
1.2


Constructor & Destructor Documentation

Err ( void   )  [protected]

Constructor initializes a default error object.

Remarks:
  • The default error index is zero.
  • The default originating CalcLib source class name is: "????".
  • The default error message is: "execution error".

Err ( int  indErr,
const char *  strCls,
const char *  strDsc 
) [protected]

Constructor initializes an error object with the specified error index, class name, and error text string.

Parameters:
indErr error index
strCls originating CalcLib source class name
strDsc a pointer to a brief error text message

Err ( const Err er  )  [protected]

Copy constructor initializes an error object from the specified existing error object.

Parameters:
er a reference to an error object

~Err ( void   )  [protected]

Destructor is a place holder, no dynamic memory is allocated.


Member Function Documentation

const char* getClass ( void   )  const

Function returns the CalcLib source class name indicating the class from which the error exception originated.

Returns:
a pointer to a class name string

const char* getDescription ( void   )  const

Function returns an error string that gives a brief statement describing the nature of the encountered error.

Returns:
a pointer to an error text string

int getIndex ( void   )  const

Function returns the error index initialized when the object was thrown.

Returns:
an error index value

const char* getLibrary ( void   )  const

Function returns the "CalcLib" identification string indicating the library from which the error exception originated.

Returns:
a pointer to a library identification string

const char* getNamespace ( void   )  const

Function returns the CalcLib namespace identification describing the namespace from which the error exception originated.

Returns:
a pointer to a namespace identification string

bool setError ( int  indErr,
const char *  strCls,
const char *  strDsc 
) [protected]

Function sets the error object with the specified error index, class name, and error text string.

Parameters:
indErr error index
strCls originating CalcLib source class name
strDsc a pointer to a brief error text message
Returns:
status flag
  • false (successful execution)
  • true (execution error, parameter not set)

bool setError ( const char *  strCls,
const char *  strDsc 
) [protected]

Function sets the error object CalcLib source class name indicating the class from which the error exception originated, and the error object string that gives a brief statement describing the nature of the encountered error.

Parameters:
strCls originating CalcLib source class name
strDsc a pointer to a brief error text message
Returns:
status flag
  • false (successful execution)
  • true (execution error, parameter not set)

bool setError ( int  indErr  )  [protected]

Function sets the error index of the error object being thrown.

Parameters:
indErr error index
Returns:
status flag
  • false (successful execution)
  • true (execution error, parameter not set)


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ostr,
const Err er 
) [friend]

Function overloads the bitwise left shift operator <<. The function prints descriptive text of an error object to the specified stream.

Parameters:
ostr a reference to a stream
er a reference to an error object
Returns:
a reference to the stream


Member Data Documentation

const char *const DEF_CLASS = "????" [static]

default error description string for a thrown CalcLib software exception object

const char *const DEF_MESSAGE = "execution error" [static]

default error description string for a thrown CalcLib software exception object

const char *const LIB_NAME = "CalcLib" [static]

library name identification string for a thrown CalcLib software exception object

const char *const LIB_NSPACE = "calc" [static]

namespace identification string for a thrown CalcLib software exception object


The documentation for this class was generated from the following file:
Generated on Wed Jul 19 09:24:08 2006 for CalcLib by  doxygen 1.4.7