presage  0.8.7
Public Member Functions | Private Attributes
PresageException Class Reference

#include <presageException.h>

Inheritance diagram for PresageException:
Inheritance graph
[legend]

List of all members.

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 ( presage_error_code_t  code,
const std::string &  msg 
) throw () [inline]

Definition at line 69 of file presageException.h.

virtual PresageException::~PresageException ( ) throw () [inline, virtual]

Definition at line 76 of file presageException.h.


Member Function Documentation

virtual const presage_error_code_t PresageException::code ( ) const throw () [inline, virtual]

Definition at line 86 of file presageException.h.

References m_code.

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

Definition at line 81 of file presageException.h.

References m_details.

Referenced by SmoothedNgramPredictor::learn().

Here is the caller graph for this function:


Member Data Documentation

Definition at line 93 of file presageException.h.

Referenced by code().

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: