From d85131349acf916e4e2256665db7211c9c7fd5fc Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Mon, 2 Jun 2008 18:06:46 +0100 Subject: [PATCH] Guard against code generation errors while adding a method object --- pybindgen/cppclass.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pybindgen/cppclass.py b/pybindgen/cppclass.py index 4ce61e4..4ee7930 100644 --- a/pybindgen/cppclass.py +++ b/pybindgen/cppclass.py @@ -969,7 +969,10 @@ public: self.methods[name] = overload method.class_ = self - overload.add(method) + try: + utils.call_with_error_handling(overload.add, (method,), {}, method) + except utils.SkipWrapper: + return else: self.nonpublic_methods.append(method) if method.is_virtual: