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 Protected Attributes |
| static std::ostream * | _errorStream |
Detailed Description
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.
Constructor & Destructor Documentation
| Failure |
( |
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. |
| 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.
- 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. |
| Failure |
( |
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. |
| 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.
- 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. |
Member Function Documentation
| static void setErrorStream |
( |
std::ostream & |
stream | ) |
|
|
static |
| std::ostream& print |
( |
std::ostream & |
o | ) |
const |
|
inline |
overload the virtual print of LinboxError.
- Parameters:
-
| static void setErrorStream |
( |
std::ostream & |
stream | ) |
|
|
static |
| std::ostream& print |
( |
std::ostream & |
o | ) |
const |
|
inline |
overload the virtual print of LinboxError.
- Parameters:
-
Field Documentation
| std::ostream * _errorStream |
|
staticprotected |
The documentation for this class was generated from the following files: