BOSS 7.0.6
BESIII Offline Software System
|
Go to the source code of this file.
Classes | |
class | ers::Precondition |
Precondition issue. More... | |
Namespaces | |
namespace | ers |
Macros | |
#define | ERS_PRECONDITION(expr, ...) { if(!(expr)) { char precondition_buffer[256] ; snprintf(precondition_buffer,256, __VA_ARGS__) ; ers::Precondition failed_precondition(ERS_HERE,ers::error,#expr,precondition_buffer,false) ; throw failed_precondition ; } } |
#define ERS_PRECONDITION | ( | expr, | |
... | |||
) | { if(!(expr)) { char precondition_buffer[256] ; snprintf(precondition_buffer,256, __VA_ARGS__) ; ers::Precondition failed_precondition(ERS_HERE,ers::error,#expr,precondition_buffer,false) ; throw failed_precondition ; } } |
if e is not true, then an issue of type ers::Asertion is thrown with message m. If the compiler is gcc, then the transient field of the assertion is set according to the transcience of the expression. This means that if the expression is detected by the compiler as being constant. If the macro N_DEBUG
is defined then the macros are disabled.
Definition at line 48 of file Precondition.h.