A precondtion failed.
More...
#include <debug.h>
|
| | Failure () |
| |
| void | operator() (const char *function, int line, const char *check) |
| |
| void | operator() (const char *function, const char *file, int line, const char *check) |
| |
| void | setErrorStream (std::ostream &stream) |
| |
| std::ostream & | print (std::ostream &o) const |
| |
A precondtion failed.
The throw mechanism is usually used here as in
if (!check)
failure()(__func__,__LINE__,
"this check just failed");
Failure & failure()
Definition: debug.h:174
The parameters of the constructor help debugging.
◆ Failure()
◆ operator()() [1/2]
| void operator() |
( |
const char * |
function, |
|
|
int |
line, |
|
|
const char * |
check |
|
) |
| |
|
inline |
A precondtion failed.
- Parameters
-
| function | usually func, the function that threw the error |
| line | usually LINE, the line where it happened |
| check | a string telling what failed. |
◆ operator()() [2/2]
| void operator() |
( |
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.
- Parameters
-
| 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. |
◆ setErrorStream()
| void setErrorStream |
( |
std::ostream & |
stream | ) |
|
◆ print()
| std::ostream& print |
( |
std::ostream & |
o | ) |
const |
|
inline |
overload the virtual print of LinboxError.
- Parameters
-
◆ _errorStream
| std::ostream* _errorStream |
|
protected |
The documentation for this class was generated from the following file: