[cffi-devel] C++ Exceptions.

Luís Oliveira luismbo at gmail.com
Mon Feb 12 16:44:45 UTC 2007


On 12/02/07, Collin Lynch <collinl at cs.pitt.edu> wrote:
> In any case, is there any way to catch the underlying c++ exceptions
> within a cffi-wrapper?  I have developed a C++ library that defines its
> own exceptions and I would like to trap them and generate an appropriate
> Lisp Condition.  At present deliberately triggering an error (say by
> passingincorrect parameters to a constructor) gives me back a null
> pointer.

C++ support would be nice. I don't personally have a need for it, but
it would be nice. Patches are welcome! :-)

The best I can do is point you at Verrazano
<http://common-lisp.net/project/fetter/>. Rayiner had some ideas on
how to access C++ libraries and there's some code too I believe.

Otherwise, you can handle exceptions and other C++ stuff by writing
some C glue and calling that with CFFI.

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/



More information about the cffi-devel mailing list