|
Boost : |
From: Ullrich Koethe (u.koethe_at_[hidden])
Date: 2001-07-13 07:12:54
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 from
> std::exception.
>
Is there any good reason not to derive from std::exception? I don't see
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) handle_exception()?
>
This could be done. However, to create corresponding Python exceptions,
you must register new Python exception objects within the module. This
is currently unsupported in Boost.Python.
> Or is there a better way of accomplishing this?
>
Derive from std::exception
Regards
Ulli
-- ________________________________________________________________ | | | Ullrich Koethe Universität Hamburg / University of Hamburg | | FB Informatik / Dept. of Computer Science | | AB Kognitive Systeme / Cognitive Systems Group | | | | Phone: +49 (0)40 42883-2573 Vogt-Koelln-Str. 30 | | Fax: +49 (0)40 42883-2572 D - 22527 Hamburg | | Email: u.koethe_at_[hidden] Germany | | koethe_at_[hidden] | | WWW: http://kogs-www.informatik.uni-hamburg.de/~koethe/ | |________________________________________________________________|
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk