[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Current best practice for C++ exception handling
- From: Gaspard Bucher <gaspard@...>
- Date: Fri, 12 Mar 2010 10:45:53 +0100
Hi there !
I am writing an automated C++ to Lua binder that uses Doxygen to parse
the source code. This tool called "Dub" (Doxygen based Ubiquitous
Binder) has the following advantages over other tools:
* no need to write receipts (it just parses the raw sources)
* automatic handling of template classes and typedefs
* handles overloaded functions
* default value handling
* enums, constants, etc
* parse and generate are different steps which makes it easy to create
bindings for other languages
Anyway, my current bindings for OpenCV are working except for C++
exception handling. I have two options here:
A. adapt "Dub" to wrap all calls in a try .. catch block and use
lua_error to push "what()" on the stack
B. do something better that someone proposes
Gaspard
PS: dub project: http://github.com/rubyk/dub
PPS: opencv bindings (experimental): http://bit.ly/akMi7b