Python and Tcl - improve error message for missing constructor when the reason is because the class is abstract.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11518 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
60e20c6ec5
commit
136bd5175a
3 changed files with 13 additions and 3 deletions
|
|
@ -2984,7 +2984,7 @@ public:
|
|||
Delete(realct);
|
||||
}
|
||||
if (!have_constructor) {
|
||||
Printv(f_shadow_file, tab4, "def __init__(self, *args, **kwargs): raise AttributeError(\"No constructor defined\")\n", NIL);
|
||||
Printv(f_shadow_file, tab4, "def __init__(self, *args, **kwargs): raise AttributeError(\"", "No constructor defined", (Getattr(n, "abstract") ? " - class is abstract" : ""), "\")\n", NIL);
|
||||
} else if (fastinit) {
|
||||
|
||||
Printv(f_wrappers, "SWIGINTERN PyObject *", class_name, "_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {\n", NIL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue