From: William S F. <ws...@fu...> - 2006-01-25 23:02:13
|
I took a closer look at the "allowexcept" feature after a query on the swig-user mailing list. Normally any %exception is ignored for variable access (both read and write) unless this feature is set. It is not documented. It seems to work for member variable access. For global variables it works for Java/C# but not the scripting languages. Should we: 1) Remove "allowexcept" and enable %exception to always be used for all global and member variable access? 2) Fix the "allowexcept" feature to work for global variables? I can see a case for always enabling it as it is quite possible for an exception to be thrown when assigning a variable, eg throwing a std::exception occurs when running out of memory. But then it is completely pointless and leads to code bloat when wrapping primitive type variables. Maybe we should just go for 2) and document the feature. William |