#include <exception>
#include <string>
#include <sstream>
#include <iostream>
#include <cstdlib>
#include <memory>
Classes | |
class | ExceptionMember< _Type > |
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... | |
Namespaces | |
namespace | lemon |
The namespace of LEMON. | |
Defines | |
#define | LEMON_ASSERT(exp, msg) |
Macro for assertions with customizable message. | |
#define | LEMON_FIXME(msg) |
Macro for mark not yet implemented features. |
#define LEMON_ASSERT | ( | exp, | |||
msg | ) |
Value:
(static_cast<void> (!!(exp) ? 0 : ( \ LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \ __PRETTY_FUNCTION__, \ msg, #exp, LEMON_ASSERT_DO_ABORT), 0)))
The assertions are disabled in the default behaviour. You can enable the assertions with the
#define LEMON_ENABLE_ASSERTS
AssertionFailedError
exception with the msg
error message. By using LEMON_ASSERT_EXCEPTION, one can define an arbitrary exception to be thrown.
The LEMON_ASSERT macro should be called with the exp
parameter which should be an expression convertible to bool. If the given parameter is false the assertion is raised and one of the assertion behaviour will be activated. The msg
should be either a const char* message or an exception. When the msg
is an exception the what() function is called to retrieve and display the error message.
#define LEMON_FIXME | ( | msg | ) |