TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
exceptions.hpp
#include "./macros.hpp"
#include <mpi/mpi.hpp>
#include <cstdlib>
#include <exception>
#include <sstream>
#include <string>

Detailed Description

TRIQS exception hierarchy and related macros.

Definition in file exceptions.hpp.

Go to the source code of this file.

Classes

class  triqs::exception
 Base class for exceptions thrown in TRIQS. More...
class  triqs::keyboard_interrupt
 Exception raised when the user interrupts the program with Ctrl-C. More...
class  triqs::runtime_error
 Generic runtime error thrown in TRIQS. More...

Macros

#define TRIQS_ASSERT(X)
 Throw a triqs::runtime_error if the boolean expression X evaluates to false.
#define TRIQS_ASSERT2(X, ...)
 Like TRIQS_ASSERT but lets the caller add a custom message.
#define TRIQS_ERROR(CLASS, NAME)
 Throw an exception of type CLASS whose message starts with Triqs <NAME> and the current source location.
#define TRIQS_KEYBOARD_INTERRUPT   TRIQS_ERROR(triqs::keyboard_interrupt, "Ctrl-C")
 Throw a triqs::keyboard_interrupt with the current source location.
#define TRIQS_RUNTIME_ERROR   TRIQS_ERROR(triqs::runtime_error, "runtime error")
 Throw a triqs::runtime_error with the current source location.