ppap4lmp  0.7.2
runtime_error.cpp
Go to the documentation of this file.
1 
8 #include <alias/pybind.h>
9 
10 #include "runtime_error.h"
11 
12 namespace ut = utils;
13 
14 /* ------------------------------------------------------------------ */
15 
17  const Str &msg)
18 {
19  #pragma omp critical (raise)
20  {
21  PyErr_SetString(PyExc_RuntimeError, msg.c_str());
22  }
23 
24  throw std::runtime_error(msg);
25 }
std::string Str
Str is an alias for string.
Definition: std.h:21
void runtime_error(const Str &msg)
Raise (for Python) and throw (for C++) a runtime error.
This file has a definition of utils::runtime_error.
Namespace for utility functions.
Definition: join.h:14
This file includes pybind11 and defines an alias for the namespace pybind11.