crossmod_exception_a.cpp 448 B

123456789101112131415161718
  1. // Copyright (C) 2003 Rational Discovery LLC
  2. // Distributed under the Boost Software License, Version 1.0. (See
  3. // accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. #include <boost/python.hpp>
  6. namespace python = boost::python;
  7. void tossit(){
  8. PyErr_SetString(PyExc_IndexError,"a-blah!");
  9. throw python::error_already_set();
  10. }
  11. BOOST_PYTHON_MODULE(crossmod_exception_a)
  12. {
  13. python::def("tossit",tossit);
  14. }