Leave unused exception variables unnamed

Thirteen catch clauses named the exception without using it. gcc and
clang accept that silently, but MSVC reports each one as C4101. Drop
the name; the handlers are unchanged.
This commit is contained in:
Erik Fröjdh committed 2026-10-05 20:59:59 +02:00
1 parent aedc4eb76e
commit e6126e2a31
5 files changed
+13 -13

No files matched your search

+1 -1
View File
@@ -144,7 +144,7 @@ void define_file_io_bindings(py::module &m) {
self.read_into(
reinterpret_cast<std::byte *>(image.mutable_data()));
return image;
} catch (std::runtime_error &e) {
} catch (std::runtime_error &) {
throw py::stop_iteration();
}
});
+1 -1
View File
@@ -101,7 +101,7 @@ void define_jungfrau_data_file_io_bindings(py::module &m) {
.def("__next__", [](JungfrauDataFile &self) {
try {
return read_dat_frame(self);
} catch (std::runtime_error &e) {
} catch (std::runtime_error &) {
throw py::stop_iteration();
}
});
+1 -1
View File
@@ -94,7 +94,7 @@ void define_raw_sub_file_io_bindings(py::module &m) {
.def("__next__", [](RawSubFile &self) {
try {
return read_frame_from_RawSubFile(self);
} catch (std::runtime_error &e) {
} catch (std::runtime_error &) {
throw py::stop_iteration();
}
});