SIRIUS 7.5.0
Electronic structure library and applications
Classes | Namespaces | Macros | Functions
rte.hpp File Reference

Eror and warning handling during run-time execution. More...

Go to the source code of this file.

Classes

class  sirius::rte::ostream
 

Namespaces

module  sirius
 Namespace of the SIRIUS library.
 
namespace  sirius::rte
 Run-time error and warning handling.
 

Macros

#define FILE_LINE   std::string(__FILE__) + ":" + std::to_string(__LINE__)
 
#define RTE_THROW(...)
 
#define RTE_WARNING(...)
 
#define RTE_ASSERT(condition__)
 
#define RTE_OUT(_out)   rte::ostream(_out, std::string(__func__))
 

Functions

void sirius::rte::message_impl (bool fatal__, const char *func__, const char *file__, int line__, std::string const &msg__)
 
void sirius::rte::message_impl (bool fatal__, const char *func__, const char *file__, int line__, std::stringstream const &msg__)
 

Detailed Description

Eror and warning handling during run-time execution.

Definition in file rte.hpp.

Macro Definition Documentation

◆ FILE_LINE

#define FILE_LINE   std::string(__FILE__) + ":" + std::to_string(__LINE__)

Definition at line 102 of file rte.hpp.

◆ RTE_THROW

#define RTE_THROW (   ...)
Value:
{\
::sirius::rte::message_impl(true, __func__, __FILE__, __LINE__, __VA_ARGS__);\
}

Definition at line 104 of file rte.hpp.

◆ RTE_WARNING

#define RTE_WARNING (   ...)
Value:
{\
::sirius::rte::message_impl(false, __func__, __FILE__, __LINE__, __VA_ARGS__);\
}

Definition at line 109 of file rte.hpp.

◆ RTE_ASSERT

#define RTE_ASSERT (   condition__)
Value:
{ \
if (!(condition__)) { \
std::stringstream _s; \
_s << "Assertion (" << #condition__ << ") failed " \
<< "at " << __FILE__ << ":" << __LINE__; \
RTE_THROW(_s); \
} \
}

Definition at line 117 of file rte.hpp.

◆ RTE_OUT

#define RTE_OUT (   _out)    rte::ostream(_out, std::string(__func__))

Definition at line 128 of file rte.hpp.