FflasFfpack
|
A precondtion failed. More...
#include <debug.h>
Public Member Functions | |
Failure (const char *function, int line, const char *check) | |
Failure (const char *function, const char *file, int line, const char *check) | |
std::ostream & | print (std::ostream &o) const |
Failure (const char *function, int line, const char *check) | |
Failure (const char *function, const char *file, int line, const char *check) | |
std::ostream & | print (std::ostream &o) const |
Static Public Member Functions | |
static void | setErrorStream (std::ostream &stream) |
static void | setErrorStream (std::ostream &stream) |
Static Protected Attributes | |
static std::ostream * | _errorStream |
A precondtion failed.
The throw
mechanism is usually used here as in
if (!check) throw(Failure(__func__,__LINE__,"this check just failed");
The parameters of the constructor help debugging.
Failure | ( | const char * | function, |
int | line, | ||
const char * | check | ||
) | [inline] |
A precondtion failed.
function | usually __func__ , the function that threw the error |
line | usually __LINE__ , the line where it happened |
check | a string telling what failed. |
Failure | ( | const char * | function, |
const char * | file, | ||
int | line, | ||
const char * | check | ||
) | [inline] |
A precondtion failed. The parameter help debugging. This is not much different from the previous except we can digg faster in the file where the exception was triggered.
function | usually __func__ , the function that threw the error |
file | usually __FILE__ , the file where this function is |
line | usually __LINE__ , the line where it happened |
check | a string telling what failed. |
Failure | ( | const char * | function, |
int | line, | ||
const char * | check | ||
) | [inline] |
A precondtion failed.
function | usually __func__ , the function that threw the error |
line | usually __LINE__ , the line where it happened |
check | a string telling what failed. |
Failure | ( | const char * | function, |
const char * | file, | ||
int | line, | ||
const char * | check | ||
) | [inline] |
A precondtion failed. The parameter help debugging. This is not much different from the previous except we can digg faster in the file where the exception was triggered.
function | usually __func__ , the function that threw the error |
file | usually __FILE__ , the file where this function is |
line | usually __LINE__ , the line where it happened |
check | a string telling what failed. |
static void setErrorStream | ( | std::ostream & | stream | ) | [static] |
std::ostream& print | ( | std::ostream & | o | ) | const [inline] |
overload the virtual print of LinboxError.
o | output stream |
static void setErrorStream | ( | std::ostream & | stream | ) | [static] |
std::ostream& print | ( | std::ostream & | o | ) | const [inline] |
overload the virtual print of LinboxError.
o | output stream |
std::ostream * _errorStream [static, protected] |