BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/ers/ers-00-00-03/ers/Precondition.h File Reference
#include <stdio.h>
#include "ers/Assertion.h"

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 ; } }
 

Macro Definition Documentation

◆ ERS_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 Event/ers/ers-00-00-03/ers/Precondition.h.