only catch AssertionError exceptions when handling overloads, so that other C++ exceptions can be raised correctly
parent
9325fda568
commit
d23b5e4cfd
|
@ -152,7 +152,7 @@ void Constructor::emit_cython_pyx(FileWriter& pyxFile, const Class& cls) const {
|
||||||
pyxFile.oss << " self." << cls.shared_pxd_obj_in_pyx() << " = "
|
pyxFile.oss << " self." << cls.shared_pxd_obj_in_pyx() << " = "
|
||||||
<< cls.shared_pxd_class_in_pyx() << "(new " << cls.pxd_class_in_pyx()
|
<< cls.shared_pxd_class_in_pyx() << "(new " << cls.pxd_class_in_pyx()
|
||||||
<< "(" << args.pyx_asParams() << "))\n";
|
<< "(" << args.pyx_asParams() << "))\n";
|
||||||
pyxFile.oss << " except:\n";
|
pyxFile.oss << " except AssertionError:\n";
|
||||||
pyxFile.oss << " pass\n";
|
pyxFile.oss << " pass\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,7 +196,7 @@ void Method::emit_cython_pyx(FileWriter& file, const Class& cls) const {
|
||||||
file.oss << " " << call << "\n";
|
file.oss << " " << call << "\n";
|
||||||
file.oss << " return\n";
|
file.oss << " return\n";
|
||||||
}
|
}
|
||||||
file.oss << " except:\n";
|
file.oss << " except AssertionError:\n";
|
||||||
file.oss << " pass\n";
|
file.oss << " pass\n";
|
||||||
}
|
}
|
||||||
file.oss
|
file.oss
|
||||||
|
|
Loading…
Reference in New Issue