Boost logo

Boost :

From: p.i.frey_at_[hidden]
Date: 2001-07-18 03:35:13


I do not know whether there is a goot reason for doing so, but we are
also using a class library having exception classes that are not
derived from std::exception. We cannot rewrite this library, and we
need support for Boost.Python to pass these exceptions to Python.


--- In boost_at_y..., Ullrich Koethe <u.koethe_at_c...> wrote:
> Chris Emerson wrote:
> >
> > I've wrapped a C++ library which throws exceptions which I'd like
to be
> > visible from Python more sensibly. The exceptions don't derive
> > std::exception.
> >
> Is there any good reason not to derive from std::exception? I don't
> any.
> > It looks like all exception handling is done in
> > boost::python::handle_exception(). Perhaps module_builder could
have an
> > optional function pointer argument to add (or replace)
> >
> This could be done. However, to create corresponding Python
> you must register new Python exception objects within the module.
> is currently unsupported in Boost.Python.
> > Or is there a better way of accomplishing this?
> >
> Derive from std::exception
> Regards
> Ulli
> --

Boost list run by bdawes at, gregod at, cpdaniel at, john at