fix: avoid catch (...) for expected import numpy failures (#3974)
* Replace import numpy catch (...) with catch (error_already_set) * Add missing const (not sure how those got lost).
This commit is contained in:
@@ -162,7 +162,7 @@ static int data_i = 42;
|
||||
TEST_SUBMODULE(numpy_array, sm) {
|
||||
try {
|
||||
py::module_::import("numpy");
|
||||
} catch (...) {
|
||||
} catch (const py::error_already_set &) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user