only catch AssertionError exceptions when handling overloads, so that other C++ exceptions can be raised correctly

release/4.3a0
Duy-Nguyen Ta 2017-08-25 11:18:16 -07:00
parent 9325fda568
commit d23b5e4cfd
2 changed files with 2 additions and 2 deletions

View File

@ -152,7 +152,7 @@ void Constructor::emit_cython_pyx(FileWriter& pyxFile, const Class& cls) const {
pyxFile.oss << " self." << cls.shared_pxd_obj_in_pyx() << " = "
<< cls.shared_pxd_class_in_pyx() << "(new " << cls.pxd_class_in_pyx()
<< "(" << args.pyx_asParams() << "))\n";
pyxFile.oss << " except:\n";
pyxFile.oss << " except AssertionError:\n";
pyxFile.oss << " pass\n";
}
}

View File

@ -196,7 +196,7 @@ void Method::emit_cython_pyx(FileWriter& file, const Class& cls) const {
file.oss << " " << call << "\n";
file.oss << " return\n";
}
file.oss << " except:\n";
file.oss << " except AssertionError:\n";
file.oss << " pass\n";
}
file.oss