ilasynth  1.0
ILASynth: Template-based ILA Synthesis Engine
exception.hpp
Go to the documentation of this file.
1 #ifndef _EXCEPTION_H_DEFINED_
2 #define _EXCEPTION_H_DEFINED_
3 
4 #include <boost/exception/exception.hpp>
5 #include <boost/python.hpp>
6 
7 namespace ilasynth {
8 /*
9  * This is a wrapper class for all the exceptions
10  * that will be thrown from the Python code.
11  */
12 struct PyILAException : public boost::exception {
13  PyObject* exception;
14  std::string message;
15 
16  PyILAException(PyObject* ex, const std::string& msg)
17  : exception(ex), message(msg) {}
18 
19  PyILAException(PyObject* ex, const char* msg) : exception(ex), message(msg) {}
20 
21  virtual ~PyILAException() throw();
22 };
23 
25 } // namespace ilasynth
26 #endif // _EXCEPTION_H_DEFINED_
PyObject * exception
Definition: exception.hpp:13
PyILAException(PyObject *ex, const char *msg)
Definition: exception.hpp:19
Definition: exception.hpp:12
std::string message
Definition: exception.hpp:14
Definition: abstraction.hpp:21
void translateILAException(PyILAException const &ex)
PyILAException(PyObject *ex, const std::string &msg)
Definition: exception.hpp:16