critical_events.h File Reference

#include <basis/astring.h>
Include dependency graph for critical_events.h:

Go to the source code of this file.

Classes

class  loggers::critical_events
 Provides a means of logging events for runtime problems. More...

Namespaces

namespace  loggers
 

A logger that sends to the console screen using the standard output device.


Defines

#define CAUSE_BREAKPOINT
 This macro wraps the notion of stopping in the debugger.
#define REQUIRE(check)   if (!check) CAUSE_BREAKPOINT;
 Tests the value "check" to ensure that it's not zero.
#define non_continuable_error(c, f, i)
 an extra piece of information used, if available, in bounds_halt below.
#define continuable_error(c, f, i)
#define console_error(c, f, i)   critical_events::FL_console_error(__FILE__, __LINE__, c, f, i)
#define deadly_error(c, f, i)   critical_events::FL_deadly_error(__FILE__, __LINE__, c, f, i)
#define out_of_memory_now(c, f)   critical_events::FL_out_of_memory_now(__FILE__, __LINE__, c, f)

Define Documentation

#define CAUSE_BREAKPOINT

This macro wraps the notion of stopping in the debugger.

Definition at line 24 of file critical_events.h.

Referenced by loggers::critical_events::FL_deadly_error().

#define console_error ( c,
f,
 )     critical_events::FL_console_error(__FILE__, __LINE__, c, f, i)

Definition at line 83 of file critical_events.h.

#define continuable_error ( c,
f,
 ) 
#define deadly_error ( c,
f,
 )     critical_events::FL_deadly_error(__FILE__, __LINE__, c, f, i)
#define non_continuable_error ( c,
f,
 ) 
Value:
critical_events::FL_non_continuable_error(__FILE__, __LINE__, c, f, i, \
      "A Non-Continuable Runtime Problem Has Occurred")

an extra piece of information used, if available, in bounds_halt below.

Verifies that "value" is between "low" and "high", inclusive.

"Value" must be an object for which greater than and less than are defined. The static_class_name() method and func definition are used to tag the complaint that is emitted when problems are detected. Note that if CATCH_ERRORS is defined, then the program is _halted_ if the value is out of bounds. Otherwise, the "to_return" value is returned. Provide some macros that will automatically add the file and line number.

These use the functions below to report different types of error situations and in some cases, exit the program.

Definition at line 77 of file critical_events.h.

Referenced by write_build_config::execute(), main(), nechung_oracle::pick_random(), bookmark_tree::process_category(), bookmark_tree::read_csv_file(), write_build_config::write_output_file(), and processes::safe_callback::~safe_callback().

#define out_of_memory_now ( c,
 )     critical_events::FL_out_of_memory_now(__FILE__, __LINE__, c, f)

Definition at line 87 of file critical_events.h.

#define REQUIRE ( check   )     if (!check) CAUSE_BREAKPOINT;

Tests the value "check" to ensure that it's not zero.

This can be used instead of an ASSERT macro to check conditions in builds with ERRORS_ARE_FATAL turned on. This macro is orthogonal to the build being built with debugging or release features.

Definition at line 44 of file critical_events.h.

Generated on Sat Jan 28 04:23:38 2012 for hoople2 project by  doxygen 1.6.3