Skip to content

Commit c1334dd

Browse files
committed
Disable some clang-tidy warnings for empty catch
1 parent d819d7b commit c1334dd

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

include/osmium/io/detail/read_thread.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ namespace osmium {
106106
~ReadThreadManager() noexcept {
107107
try {
108108
close();
109-
} catch (...) {
109+
} catch (...) { // NOLINT(bugprone-empty-catch)
110110
// Ignore any exceptions because destructor must not throw.
111111
}
112112
}

include/osmium/io/reader.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ namespace osmium {
390390

391391
try {
392392
m_read_thread_manager.close();
393-
} catch (...) {
393+
} catch (...) { // NOLINT(bugprone-empty-catch)
394394
// Ignore any exceptions.
395395
}
396396

include/osmium/util/progress_bar.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ namespace osmium {
132132
if (m_do_cleanup) {
133133
try {
134134
done();
135-
} catch (...) {
135+
} catch (...) { // NOLINT(bugprone-empty-catch)
136136
// Swallow any exceptions, because a destructor should
137137
// not throw.
138138
}

test/t/io/test_reader.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ TEST_CASE("Reader should work when there is an exception in main thread before g
266266
const osmium::io::Reader reader{with_data_dir("t/io/data.osm")};
267267
REQUIRE_FALSE(reader.eof());
268268
throw std::runtime_error{"foo"};
269-
} catch (...) {
269+
} catch (...) { // NOLINT(bugprone-empty-catch)
270270
}
271271

272272
REQUIRE(count == count_fds());
@@ -280,7 +280,7 @@ TEST_CASE("Reader should work when there is an exception in main thread while re
280280
REQUIRE_FALSE(reader.eof());
281281
auto header = reader.header();
282282
throw std::runtime_error{"foo"};
283-
} catch (...) {
283+
} catch (...) { // NOLINT(bugprone-empty-catch)
284284
}
285285

286286
REQUIRE(count == count_fds());

0 commit comments

Comments
 (0)