From: Barry S. <ba...@ba...> - 2007-10-19 16:12:27
|
On Oct 18, 2007, at 04:40, Tim Docker wrote: > I've just been taking a look at pyCxx, and it's looks quite nice. > > I notice that in Objects.hxx, there's lot's of code snippets that > look like: > > if (PyErr_Occurred()) throw Exception(); > > Would it be better to call a function that interrogates the > exeception status, and throws an exception of the appropriate > derived type? That way you could catch more specifically in the C++ > code. > Having re-read the code that would be better. Would you like to submit a patch to do this? > > Also, is there a reason why Exception doesn't derive from > std::exception? No reason, the code is older then std::exception and I guess it should be updated so long as there is no problem introduced by doing this. Barry |