py_error.hpp 176 B

12345678910111213
  1. #include <Python.h>
  2. #include "error.hpp"
  3. void raise_py_error(){
  4. try{
  5. throw;
  6. } catch(Error& error){
  7. PyErr_SetString(PyExc_RuntimeError,error.msg.c_str());
  8. }
  9. }