error.h File Reference


Detailed Description

Author:
Herve Lombaert
Date:
January 17th 2006

#include <cstdio>
#include <cstdarg>
#include <cstring>

Include dependency graph for error.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Error
struct  RangeError
struct  LocateError

Defines

#define CHECK(msg, testvalid)   { if(testvalid==0) throw LOCATE(Error(msg)); }
#define CHECKRANGE(msg, val, low, up)   { if(val<low || val>=up) throw LOCATE(RangeError(msg,(float)val,(float)low,(float)up)); }
#define CHECKMIN(msg, val, min)   { if(val<min) throw LOCATE(RangeError(msg,(float)val,(float)min,0)); }
#define CHECKMAX(msg, val, max)   { if(val>=max) throw LOCATE(RangeError(msg,(float)val,0,(float)max)); }
#define LOCATE(Error)   LocateError(Error, __FILE__, __LINE__)


Define Documentation

#define CHECK ( msg,
testvalid   )     { if(testvalid==0) throw LOCATE(Error(msg)); }

#define CHECKMAX ( msg,
val,
max   )     { if(val>=max) throw LOCATE(RangeError(msg,(float)val,0,(float)max)); }

Check maximum, test is val < max

#define CHECKMIN ( msg,
val,
min   )     { if(val<min) throw LOCATE(RangeError(msg,(float)val,(float)min,0)); }

Check minimum, test is val >= min

#define CHECKRANGE ( msg,
val,
low,
up   )     { if(val<low || val>=up) throw LOCATE(RangeError(msg,(float)val,(float)low,(float)up)); }

Check range, test is low <= val < up

Referenced by Image< T, N >::get(), Image< T, N >::getSize(), Image< T, N >::set(), and Image< T, N >::size().

#define LOCATE ( Error   )     LocateError(Error, __FILE__, __LINE__)


Generated on Tue Aug 4 17:57:42 2009 for libvd by  doxygen 1.5.5