From af9c04c88bb38d085355b156ef88165715a89d21 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Sun, 12 Oct 2008 12:09:46 +0100 Subject: [PATCH] Better error messages --- pybindgen/cppmethod.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pybindgen/cppmethod.py b/pybindgen/cppmethod.py index f73f778..c9c1c78 100644 --- a/pybindgen/cppmethod.py +++ b/pybindgen/cppmethod.py @@ -499,10 +499,12 @@ class CppConstructor(ForwardWrapperBase): Returns the wrapper function name. """ if self.visibility == 'private': - raise CodeGenerationError("private constructor") + raise CodeGenerationError("Class %r has a private constructor ->" + " cannot generate a constructor for it" % self._class.full_name) elif self.visibility == 'protected': if self._class.helper_class is None: - raise CodeGenerationError("protected constructor and no helper class") + raise CodeGenerationError("Class %r has a protected constructor and no helper class" + " -> cannot generate a constructor for it" % self._class.full_name) #assert isinstance(class_, CppClass) tmp_sink = codesink.MemoryCodeSink()