FflasFfpack
Public Member Functions | Static Public Member Functions | Static Protected Attributes
Failure Class Reference

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

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:
functionusually __func__, the function that threw the error
lineusually __LINE__, the line where it happened
checka 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:
functionusually __func__, the function that threw the error
fileusually __FILE__, the file where this function is
lineusually __LINE__, the line where it happened
checka string telling what failed.
Failure ( const char *  function,
int  line,
const char *  check 
) [inline]

A precondtion failed.

Parameters:
functionusually __func__, the function that threw the error
lineusually __LINE__, the line where it happened
checka 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:
functionusually __func__, the function that threw the error
fileusually __FILE__, the file where this function is
lineusually __LINE__, the line where it happened
checka 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:
ooutput stream
static void setErrorStream ( std::ostream &  stream) [static]
std::ostream& print ( std::ostream &  o) const [inline]

overload the virtual print of LinboxError.

Parameters:
ooutput stream

Field Documentation

std::ostream * _errorStream [static, protected]

The documentation for this class was generated from the following files: