Skip to content

Commit e408883

Browse files
committed
Define "exception classes" w/--disable-exceptions
We can still query these for what() even we can't throw them. At least with gcc, -fno-exceptions still has the same policy with std::exception etc., so we can still use those as superclasses.
1 parent 0d27577 commit e408883

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

include/base/libmesh_exceptions.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,10 @@
2222

2323
#include "libmesh/libmesh_config.h"
2424

25-
#ifdef LIBMESH_ENABLE_EXCEPTIONS
2625
#include <stdexcept>
2726
#include <string>
2827
#include <sstream>
2928

30-
#define libmesh_noexcept noexcept
31-
3229
namespace libMesh {
3330

3431
/**
@@ -145,6 +142,9 @@ class SolverException: public std::exception
145142

146143
}
147144

145+
#ifdef LIBMESH_ENABLE_EXCEPTIONS
146+
#define libmesh_noexcept noexcept
147+
148148
#define LIBMESH_THROW(e) do { throw e; } while (0)
149149
#define libmesh_try try
150150
#define libmesh_catch(e) catch(e)

0 commit comments

Comments
 (0)