LWPR_Exception Class Reference
[C++ wrapper around the LWPR library]

Simple class for describing exceptions that may be thrown during calls to LWPR methods. More...

#include <lwpr.hh>

Public Types

enum  Code {
  OUT_OF_MEMORY, BAD_INPUT_DIM, BAD_OUTPUT_DIM, BAD_INIT_D,
  UNKNOWN_KERNEL, IO_ERROR, OUT_OF_RANGE, UNSPECIFIED_ERROR
}
 

This enumeration lists the possible error codes for exceptions thrown by LWPR_Object methods.

More...

Public Member Functions

 LWPR_Exception (Code code)
 Creates an LWPR exception with error code "code".
Code getCode () const
 Returns one of the values in LWPR_Exception::Code.
const char * getString () const
 Returns a short string describing this exception.

Private Attributes

Code code
 The exception's error code.

Detailed Description

Simple class for describing exceptions that may be thrown during calls to LWPR methods.


Member Enumeration Documentation

This enumeration lists the possible error codes for exceptions thrown by LWPR_Object methods.

Enumerator:
OUT_OF_MEMORY 

Thrown when a method required allocating new memory, but failed.

BAD_INPUT_DIM 

Thrown when an argument should have matched the input dimension of the LWPR model, but did not.

BAD_OUTPUT_DIM 

Thrown when an argument should have matched the output dimension of the LWPR model, but did not.

BAD_INIT_D 

Thrown when the desired initial distance metric is not positive definite.

UNKNOWN_KERNEL 

Thrown when the name of an unknown kernel function has been passed.

IO_ERROR 

Thrown when errors occured during reading from or writing to files.

OUT_OF_RANGE 

Thrown when an out-of-range index was passed.

UNSPECIFIED_ERROR 

Thrown in any other error case (should not happen).


Constructor & Destructor Documentation

LWPR_Exception::LWPR_Exception ( Code  code  )  [inline]

Creates an LWPR exception with error code "code".

Parameters:
code One of the values in LWPR_Exception::Code
Returns:
A new exception object

The documentation for this class was generated from the following file:
Generated on Thu Feb 9 08:18:36 2012 for LWPR Library by  doxygen 1.6.3