Skip to content

Commit 03d595a

Browse files
committed
Don't try/catch with --disable-exceptions
I need to get CI to start using -fno-exceptions for that case...
1 parent 748b991 commit 03d595a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/mesh/mesh_input.C

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,8 +919,10 @@ public:
919919
// Debugging this in parallel is tricky. Let's make sure that
920920
// if we have a failure on one rank we see it on all the others
921921
// and we can go on to other tests.
922+
#ifdef LIBMESH_ENABLE_EXCEPTIONS
922923
bool threw_exception = false;
923924
try
925+
#endif // LIBMESH_ENABLE_EXCEPTIONS
924926
{
925927
for (const auto & elem : mesh.active_local_element_ptr_range())
926928
{
@@ -987,6 +989,7 @@ public:
987989
}
988990
}
989991
}
992+
#ifdef LIBMESH_ENABLE_EXCEPTIONS
990993
catch (...)
991994
{
992995
threw_exception = true;
@@ -996,6 +999,7 @@ public:
996999
if (!threw_exception)
9971000
TestCommWorld->max(threw_exception);
9981001
CPPUNIT_ASSERT(!threw_exception);
1002+
#endif // LIBMESH_ENABLE_EXCEPTIONS
9991003

10001004
TestCommWorld->sum(n_side_nodes);
10011005
CPPUNIT_ASSERT_EQUAL(n_side_nodes, n_fake_nodes);

0 commit comments

Comments
 (0)