PresageException Class Reference

`#include <presageException.h>`

Inheritance diagram for PresageException:
Collaboration diagram for PresageException:

## Public Member Functions

| PresageException (presage_error_code_t code, const std::string &msg) throw ()
virtual | ~PresageException () throw ()
virtual const char * | what () const throw ()
virtual const presage_error_code_t | code () const throw ()

## Private Attributes

std::string | m_details
presage_error_code_t | m_code

## Detailed Description

When thrown, provides information about an error that has occurred within presage.

If an error occurs within presage, an exception is thrown, and this is the object that encapsulates the details of the problem.

Application using presage should always ensure that exceptions are caught by enclosing all presage methods within a try{} catch(PresageException& e) {} block.

Definition at line 67 of file presageException.h.

## Constructor & Destructor Documentation

## PresageException()

PresageException::PresageException | ( | presage_error_code_t | code,
|  | const std::string & | msg
| ) |  |
throw | ( |
| ) |  |

inline

Definition at line 69 of file presageException.h.

## ~PresageException()

virtual PresageException::~PresageException | ( |  | ) |
throw | ( |
| ) |  |

inline virtual

Definition at line 76 of file presageException.h.

## Member Function Documentation

## code()

virtual const presage_error_code_t PresageException::code | ( |  | ) | const
throw | ( |
| ) |  |

inline virtual

Definition at line 86 of file presageException.h.

References m_code.

## what()

virtual const char* PresageException::what | ( |  | ) | const
throw | ( |
| ) |  |

inline virtual

Definition at line 81 of file presageException.h.

References m_details.

Referenced by PredictorRegistry::addPredictor(), and SmoothedNgramPredictor::learn().

Here is the caller graph for this function:

## Member Data Documentation

## m_code

presage_error_code_t PresageException::m_code

private

Definition at line 93 of file presageException.h.

Referenced by code().

## m_details

std::string PresageException::m_details

private

Definition at line 92 of file presageException.h.

Referenced by what().

The documentation for this class was generated from the following file:

- /build/presage-F72hLE/presage-0.9.1/src/lib/presageException.h