Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

Error handling functions


Defines

#define it_assert0(t, s)   ((void)0)
#define it_assert1(t, s)   ((void)0)
#define it_assert(t, s)   (void)((t) || (it_assert_f(#t,s,__FILE__,__LINE__),0))
 Abort if t is NOT true and output s.
#define it_error_if(t, s)   (void)((!(t)) || (it_error_f(s,__FILE__,__LINE__),0))
 Abort if t is true and output s.
#define it_error(s)   it_error_f(s,__FILE__,__LINE__)
 Abort and output s.
#define it_warning(s)   it_warning_f(s,__FILE__,__LINE__)
 Output the warning s.

Functions

void SPUC::it_assert_f (string ass, string msg, string file, int line)
 Helper function for the it_assert functions.
void SPUC::it_error_f (string msg, string file, int line)
 Helper function for the it_error functions.
void SPUC::it_warning_f (string msg, string file, int line)
 Helper function for the it_warning functions.
void SPUC::it_enable_exceptions (bool on)
 Enable/disable using exceptions for error handling.
void SPUC::it_enable_warnings ()
 Enable warnings.
void SPUC::it_disable_warnings ()
 Disable warnings.
void SPUC::it_redirect_warnings (ostream *warn_stream)
 Redirect warnings to the ostream warn_stream.

Detailed Description

For all functions, the argument s is a string that is displayed.

  it_assert(t,s);   // Abort if \c t is not true.
  it_assert0(t,s);  // Abort if \c t is not true and ASSERT_LEVEL = 2
  it_assert1(t,s);  // Abort if \c t is not true and ASSERT_LEVEL = 2 or 1
  it_error_if(t,s); // Abort if \c t is true.
  it_error(s);      // Abort.
  it_warning(s);    // Show a warning.

it_assert(), it_error() and it_warning() is always active while it_assert0() and it_assert1() depends on the ASSERT_LEVEL variable. If ASSERT_LEVEL == 0 then none of these are executed while if it is 1 only it_assert1() is executed.


Define Documentation

#define it_assert t,
 )     (void)((t) || (it_assert_f(#t,s,__FILE__,__LINE__),0))
 

Abort if t is NOT true and output s.

#define it_assert0 t,
 )     ((void)0)
 

#define it_assert1 t,
 )     ((void)0)
 

#define it_error  )     it_error_f(s,__FILE__,__LINE__)
 

Abort and output s.

#define it_error_if t,
 )     (void)((!(t)) || (it_error_f(s,__FILE__,__LINE__),0))
 

Abort if t is true and output s.

#define it_warning  )     it_warning_f(s,__FILE__,__LINE__)
 

Output the warning s.


Function Documentation

void SPUC::it_assert_f string  ass,
string  msg,
string  file,
int  line
 

Helper function for the it_assert functions.

void SPUC::it_disable_warnings  ) 
 

Disable warnings.

void SPUC::it_enable_exceptions bool  on  ) 
 

Enable/disable using exceptions for error handling.

void SPUC::it_enable_warnings  ) 
 

Enable warnings.

void SPUC::it_error_f string  msg,
string  file,
int  line
 

Helper function for the it_error functions.

void SPUC::it_redirect_warnings ostream *  warn_stream  ) 
 

Redirect warnings to the ostream warn_stream.

void SPUC::it_warning_f string  msg,
string  file,
int  line
 

Helper function for the it_warning functions.


Generated on Fri Sep 16 11:06:48 2005 for spuc by  doxygen 1.4.4