The Open Master Hearing Aid (openMHA)
openMHA
Open community platform for hearing aid algorithm research
|
Error reporting exception class. More...
Inherits std::exception.
Public Member Functions | |
MHA_Error (const char *file, int line, const char *fmt,...) __attribute__((__format__(printf | |
Create an instance of a MHA_Error. More... | |
MHA_Error (const MHA_Error &) | |
MHA_Error & | operator= (const MHA_Error &) |
~MHA_Error () throw () | |
const char * | get_msg () const |
Return the error message without source position. More... | |
const char * | get_longmsg () const |
Return the error message with source position. More... | |
const char * | what () const throw () |
overwrite std::execption::what() More... | |
Private Attributes | |
char * | msg |
char * | longmsg |
Error reporting exception class.
This class is used for error handling in the openMHA. It is used by the openMHA kernel and by the openMHA toolbox library. Please note that exceptions should not be used accross ANSI-C interfaces. It is necessary to catch exceptions within the library.
The MHA_Error class holds source file name, line number and an error message.
MHA_Error::MHA_Error | ( | const char * | s_file, |
int | l, | ||
const char * | fmt, | ||
... | |||
) |
Create an instance of a MHA_Error.
s_file | source file name (FILE ) |
l | source line (LINE ) |
fmt | format string for error message (as in printf) |
MHA_Error::MHA_Error | ( | const MHA_Error & | p | ) |
MHA_Error::~MHA_Error | ( | ) | ||
throw | ( | |||
) |
|
inline |
Return the error message without source position.
|
inline |
Return the error message with source position.
|
inline |
overwrite std::execption::what()
|
private |
|
private |