HepMC3 event record library
Data Structures | Namespaces
Errors.h File Reference

Detailed Description

Implementation of error and warning macros.

Definition in file Errors.h.

#include <iostream>
#include <stdexcept>
+ Include dependency graph for Errors.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  Exception
 Standard runtime error. More...
 
struct  WeightError
 Exception related to weight lookups, setting, and index consistency. More...
 

Namespaces

namespace  HepMC3
 HepMC3 main namespace.
 

Macros

Printing macros
#define ERROR(MESSAGE)   if ( Setup::print_errors() ) { std::cerr << "ERROR::" << MESSAGE << std::endl; }
 Macro for printing error messages. More...
 
#define WARNING(MESSAGE)   if ( Setup::print_warnings() ) { std::cout << "WARNING::" << MESSAGE << std::endl; }
 Macro for printing warning messages. More...
 
#define DEBUG(LEVEL, MESSAGE)   if( Setup::debug_level()>=(LEVEL) ) { std::cout << "DEBUG(" << LEVEL <<")::" << MESSAGE << std::endl; }
 Macro for printing debug messages with appropriate debug level. More...
 
#define DEBUG_CODE_BLOCK(x)   x
 Macro for storing code useful for debugging. More...
 

Macro Definition Documentation

◆ DEBUG

#define DEBUG (   LEVEL,
  MESSAGE 
)    if( Setup::debug_level()>=(LEVEL) ) { std::cout << "DEBUG(" << LEVEL <<")::" << MESSAGE << std::endl; }

Macro for printing debug messages with appropriate debug level.

Definition at line 32 of file Errors.h.

◆ DEBUG_CODE_BLOCK

#define DEBUG_CODE_BLOCK (   x)    x

Macro for storing code useful for debugging.

Definition at line 34 of file Errors.h.

◆ ERROR

#define ERROR (   MESSAGE)    if ( Setup::print_errors() ) { std::cerr << "ERROR::" << MESSAGE << std::endl; }

Macro for printing error messages.

Definition at line 23 of file Errors.h.

◆ WARNING

#define WARNING (   MESSAGE)    if ( Setup::print_warnings() ) { std::cout << "WARNING::" << MESSAGE << std::endl; }

Macro for printing warning messages.

Definition at line 26 of file Errors.h.