We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5af87d0 commit 9220f02Copy full SHA for 9220f02
packages/seacas/libraries/ioss/src/Ioss_Utils.h
@@ -38,11 +38,12 @@ namespace Ioss {
38
[[noreturn]] inline void IOSS_ERROR(const std::string &errmsg)
39
{
40
#if defined(SEACAS_HAVE_MPI)
41
- std::cerr "ERROR: " << errmsg << "\n";
42
- MPI_Abort(MPI_COMM_WORLD);
43
-#else
44
- throw std::runtime_error(errmsg);
+ std::cerr << "ERROR: " << errmsg << "\n";
+ MPI_Abort(MPI_COMM_WORLD, 1);
+ // MPI_Abort should not return, but if it does, we throw the exception...
+ // This helps quiet the compiler also.
45
#endif
46
+ throw std::runtime_error(errmsg);
47
}
48
49
[[noreturn]] inline void IOSS_ERROR(const std::ostringstream &errmsg) { IOSS_ERROR(errmsg.str()); }
0 commit comments