error.h File Reference


Detailed Description

#include <exception>
#include <string>
#include <sstream>
#include <iostream>
#include <cstdlib>
#include <memory>

Go to the source code of this file.

Namespaces

namespace  lemon

Classes

class  ExceptionMember
 Exception safe wrapper class. More...
class  ErrorMessage
 Exception-safe convenient "error message" class. More...
class  Exception
 Generic exception class. More...
class  LogicError
 One of the two main subclasses of Exception. More...
class  UninitializedParameter
 Exception for uninitialized parameters. More...
class  RuntimeError
 One of the two main subclasses of Exception. More...
class  RangeError
  More...
class  IOError
  More...
class  DataFormatError
  More...
class  FileOpenError
  More...
class  AssertionFailedError
  More...

Defines

#define LEMON_ASSERT(exp, msg)
 Macro for assertions with customizable message.
#define LEMON_FIXME(msg)
 Macro for mark not yet implemented features.


Define Documentation

#define LEMON_ASSERT exp,
msg   ) 
 

Value:

(static_cast<void> (!!(exp) ? 0 : (         \
       LEMON_ASSERT_HANDLER(__FILE__, __LINE__,  \
                            __PRETTY_FUNCTION__, \
                            msg, #exp, LEMON_ASSERT_ABORT), 0)))
Macro for assertions with customizable message.

The behaviour can be customized with LEMON_ASSERT_HANDLER, LEMON_ASSERT_EXCEPTION and LEMON_ASSERT_ABORT defines. Asserts can be disabled by defining either NDEBUG or LEMON_DISABLE_ASSERTS macros.

Todo:
We should provide some way to reset to the default behaviour, shouldn't we?
Todo:
This whole 'assert' business should be placed in a separate include file. The boost assert is not guarded by header sentries which may help to change the behaviour of the assertions in the files.
Todo:
__PRETTY_FUNCTION__ should be replaced by something compiler-independent, like BOOST_CURRENT_FUNCTION

#define LEMON_FIXME msg   ) 
 

Value:

(LEMON_ASSERT_HANDLER(__FILE__, __LINE__, __PRETTY_FUNCTION__, \
                          "FIXME: " msg))
Todo:
Is this the right place for this? It should be used only in modules under development.
Todo:
__PRETTY_FUNCTION__ should be replaced by something compiler-independent, like BOOST_CURRENT_FUNCTION


Generated on Fri Feb 3 18:39:54 2006 for LEMON by  doxygen 1.4.6