#include "alib/lib/fs_integers/integers.hpp"#include "alib/lib/fs_debug/assert.hpp"#include <assert.h>Go to the source code of this file.
Namespaces | |
| aworx | |
| aworx::lib | |
Macros | |
Debug Assertions, Warnings and Errors | |
The macros listed here are defined in two different versions, depending on the ALib distribution. With single ALib Modules that do not incorporate class aworx::lib::results::Report and family, namespace function aworx::lib::DbgSimpleALibMsg (and overloads) are used to write the messages. The default implementation of this message invokes assert(false) if the message is of error type. If class report is included in the selected ALib distribution, two things happen:
If also module ALox is compiled into the library, then a plug-in that uses ALox for the message output is used. See class ALoxReportWriter for more information. | |
| #define | ALIB_ASSERT(cond) { if(!(cond)) ALIB_ERROR( "Assertion Failed" ); } |
| #define | ALIB_ASSERT_ERROR(cond, ...) { if(!(cond)) ALIB_ERROR( __VA_ARGS__ ); } |
| #define | ALIB_ASSERT_MESSAGE(cond, ...) { if(!(cond)) ALIB_MESSAGE( __VA_ARGS__ ); } |
| #define | ALIB_ASSERT_RESULT_EQUALS( func, value) { auto result= func; assert(result == value); ((void) result); } |
| #define | ALIB_ASSERT_RESULT_GREATER_THAN(func, value) { auto result= func; assert(result > value); ((void) result); } |
| #define | ALIB_ASSERT_RESULT_LESS_THAN( func, value) { auto result= func; assert(result < value); ((void) result); } |
| #define | ALIB_ASSERT_RESULT_NOT_EQUALS( func, value) { auto result= func; assert(result != value); ((void) result); } |
| #define | ALIB_ASSERT_WARNING(cond, ...) { if(!(cond)) ALIB_WARNING( __VA_ARGS__ ); } |
| #define | ALIB_ERROR(...) { aworx::lib::DbgSimpleALibMsg( ALIB_CALLER_PRUNED, 0, __VA_ARGS__); } |
| #define | ALIB_MESSAGE(...) { aworx::lib::DbgSimpleALibMsg( ALIB_CALLER_PRUNED, 2, __VA_ARGS__); } |
| #define | ALIB_WARNING(...) { aworx::lib::DbgSimpleALibMsg( ALIB_CALLER_PRUNED, 1, __VA_ARGS__); } |
Functions | |
| ALIB_API void | DbgSimpleALibMsg (const char *file, int line, const char *method, int type, const char *msg, const integer intValue) |
| ALIB_API void | DbgSimpleALibMsg (const char *file, int line, const char *method, int type, const char *msg1, const char *msg2=nullptr, const char *msg3=nullptr, const char *msg4=nullptr, const char *msg5=nullptr) |
This header file is part of file set Debug of the ALib C++ Library.
© 2013-2019 A-Worx GmbH, Germany. Published under Boost Software License.
Definition in file assert.hpp.