mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-24 22:57:42 -05:00
test_broadcast: derive from std::exception
This commit is contained in:
1 parent
6c91565f1f
commit
37c2c316c6
1 file changed
+6
-1
@@ -29,12 +29,17 @@
|
||||
#include <opm/simulators/utils/MPISerializer.hpp>
|
||||
#include <dune/common/parallel/mpihelper.hh>
|
||||
|
||||
#include <exception>
|
||||
#include <numeric>
|
||||
|
||||
#if HAVE_MPI
|
||||
struct MPIError
|
||||
struct MPIError : public std::exception
|
||||
{
|
||||
MPIError(std::string s, int e) : errorstring(std::move(s)), errorcode(e){}
|
||||
|
||||
const char* what() const noexcept override
|
||||
{ return errorstring.c_str(); }
|
||||
|
||||
std::string errorstring;
|
||||
int errorcode;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user