File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
packages/seacas/libraries/ioss/src Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -35,18 +35,20 @@ namespace Ioss {
3535 enum class ElementShape : unsigned int ;
3636} // namespace Ioss
3737
38- [[noreturn]] inline void IOSS_ERROR (const std::ostringstream &errmsg)
38+ [[noreturn]] inline void IOSS_ERROR (const std::string &errmsg)
3939{
40- throw std::runtime_error ((errmsg).str ());
41- }
42-
43- [[noreturn]] inline void IOSS_ERROR (const std::string &errmsg) { throw std::runtime_error (errmsg); }
44-
45- #ifdef NDEBUG
46- #define IOSS_ASSERT_USED (x ) (void )x
40+ #if defined(SEACAS_HAVE_MPI)
41+ std::cerr " ERROR: " << errmsg << " \n " ;
42+ MPI_Abort (MPI_COMM_WORLD);
4743#else
48- # define IOSS_ASSERT_USED ( x )
44+ throw std::runtime_error (errmsg);
4945#endif
46+ }
47+
48+ [[noreturn]] inline void IOSS_ERROR (const std::ostringstream &errmsg)
49+ {
50+ IOSS_ERROR (errmsg.str ());
51+ }
5052
5153// We have been relying on the assumption that calling `.data()` on an empty vector
5254// will return `nullptr`. However, according to cppreference (based on the standard):
You can’t perform that action at this time.
0 commit comments