MeshKit  1.0
Error Class Reference

The Error object returned from or thrown by many MeshKit functions. More...

#include <meshkit/Error.hpp>

Inheritance diagram for Error:

List of all members.

Public Member Functions

 Error (int err)
 Constructor.
 Error (int err, const char *format,...)
 Error ()
virtual ~Error () throw ()
 Destructor.
virtual ErrorCode error_code () const
 Return the error code.
virtual const char * what () const throw ()
 Standard function for retrieving a description of this Error.
virtual void set_string (const char *str)
 Set the error string.

Static Public Member Functions

static const char * error_str (ErrorCode err)
 Return an error string for the specified code.

Private Attributes

ErrorCode errorCode
 Locally-stored error code, from ErrorCode enumeration.
std::string errDescription
 String-based description of error.

Detailed Description

The Error object returned from or thrown by many MeshKit functions.

This class is derived from std::exception.

Definition at line 68 of file Error.hpp.


Constructor & Destructor Documentation

Error ( int  err) [inline]

Constructor.

Parameters:
errError code to which this Error should be initialized

Definition at line 120 of file Error.hpp.

Error ( int  err,
const char *  format,
  ... 
)

Definition at line 7 of file Error.cpp.

Error ( ) [inline]

Definition at line 83 of file Error.hpp.

~Error ( ) throw () [inline, virtual]

Destructor.

Must have throw() to match std::exception.

Definition at line 122 of file Error.hpp.


Member Function Documentation

ErrorCode error_code ( ) const [inline, virtual]

Return the error code.

Definition at line 124 of file Error.hpp.

const char * error_str ( ErrorCode  err) [inline, static]

Return an error string for the specified code.

Parameters:
errError code whose string is being queried
Returns:
String corresponding to the error code

Definition at line 134 of file Error.hpp.

void set_string ( const char *  str) [inline, virtual]

Set the error string.

Parameters:
strString to set

Definition at line 152 of file Error.hpp.

const char * what ( ) const throw () [inline, virtual]

Standard function for retrieving a description of this Error.

Must have throw() to match std::exception.

Returns:
Text description of error.

Definition at line 129 of file Error.hpp.


Member Data Documentation

std::string errDescription [private]

String-based description of error.

Definition at line 117 of file Error.hpp.

ErrorCode errorCode [private]

Locally-stored error code, from ErrorCode enumeration.

Definition at line 114 of file Error.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines