linbox
debug.h File Reference

Various utilities for debugging. More...

#include <iostream>
#include <sstream>
#include "linbox/util/error.h"
#include <vector>
#include <list>
#include <givaro/givprint.h>

Data Structures

class  PreconditionFailed
 A precondition failed. More...
 
class  NotImplementedYet
 
class  LinBoxFailure
 
class  LinBoxError
 
class  Exception
 This is the exception class in LinBox. More...
 
class  algoException
 Algorithmic exception. More...
 
class  NotImplementedYetException
 Not implemented yet. More...
 
class  IrrecuperableException
 Something bad an unexpected happened. More...
 
class  BadInputException
 The input is not as expected. More...
 

Namespaces

namespace  LinBox
 Namespace in which all linbox code resides.
 

Macros

#define linbox_check(check)
 Check an assertion (à la std::assert).
 
#define THIS_CODE_COMPILES_BUT_IS_NOT_TESTED    std::cout << "*** Warning *** " << std::endl << __func__ << " in " << __FILE__ << ':' << __LINE__ << " is not tested" << std::endl;
 
#define THIS_CODE_MAY_NOT_COMPILE_AND_IS_NOT_TESTED   throw(" *** Warning *** this piece of code is not compiled by default and may not work")
 
#define LB_FILE_LOC    __func__,__FILE__,__LINE__
 
#define CONC(a, b)
 
#define LINBOX_SILENT_EXCEPTION(name)
 
#define LINBOX_RAISE_EXCEPTION(name, why)
 

Detailed Description

Various utilities for debugging.

Todo
we should put vector printing elsewhere.

Macro Definition Documentation

◆ linbox_check

#define linbox_check ( check)
Value:
if (!(check)) \
throw ::LinBox::PreconditionFailed (__FILE__, __LINE__, #check);

Check an assertion (à la std::assert).

If in DEBUG mode, throws a PreconditionFailed exception. In REALEASE mode, nothing is checked.

Parameters
checkassertion to be checked.

◆ THIS_CODE_COMPILES_BUT_IS_NOT_TESTED

#define THIS_CODE_COMPILES_BUT_IS_NOT_TESTED    std::cout << "*** Warning *** " << std::endl << __func__ << " in " << __FILE__ << ':' << __LINE__ << " is not tested" << std::endl;

◆ THIS_CODE_MAY_NOT_COMPILE_AND_IS_NOT_TESTED

#define THIS_CODE_MAY_NOT_COMPILE_AND_IS_NOT_TESTED   throw(" *** Warning *** this piece of code is not compiled by default and may not work")

◆ LB_FILE_LOC

#define LB_FILE_LOC    __func__,__FILE__,__LINE__

◆ CONC

#define CONC ( a,
b )
Value:
a ## b

◆ LINBOX_SILENT_EXCEPTION

#define LINBOX_SILENT_EXCEPTION ( name)
Value:
throw CONC(name,Exception) ()
#define CONC(a, b)
Definition debug.h:320

◆ LINBOX_RAISE_EXCEPTION

#define LINBOX_RAISE_EXCEPTION ( name,
why )
Value:
throw CONC(name,Exception) ()