presage
0.8.7
|
#include <presageException.h>
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 |
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.
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.
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().
presage_error_code_t PresageException::m_code [private] |
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().