Better error messages
This commit is contained in:
1 parent
9c1dcf79df
commit
af9c04c88b
1 file changed
+4
-2
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user