From: Matthias Maier Date: Fri, 23 Jun 2023 12:58:55 +0000 (+0000) Subject: Update include/deal.II/trilinos/nox.templates.h X-Git-Tag: v9.5.0-rc1~40^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8897fb6de01bab0d6df68eb73d62294dc1f4c8a8;p=dealii.git Update include/deal.II/trilinos/nox.templates.h Co-authored-by: Martin Kronbichler --- diff --git a/include/deal.II/trilinos/nox.templates.h b/include/deal.II/trilinos/nox.templates.h index b3e4bee8fe..64470a2da0 100644 --- a/include/deal.II/trilinos/nox.templates.h +++ b/include/deal.II/trilinos/nox.templates.h @@ -1161,21 +1161,21 @@ namespace TrilinosWrappers ExcNOXNoConvergence()); } } - // See if NOX returned by triggering an exception. -#if DEAL_II_TRILINOS_VERSION_GTE(4, 2, 0) - // Starting with Trilinos version 4.2.0 NOX started to throw a + // See if NOX returned by triggering an exception. +# if DEAL_II_TRILINOS_VERSION_GTE(14, 2, 0) + // Starting with Trilinos version 14.2.0 NOX started to throw a // std::runtime_error instead of a plain char*. catch (const std::runtime_error &exc) { const char *s = exc.what(); -#else +# else // In a sign of generally poor software design, NOX prior to Trilinos // version 4.2.0 throws an exception that is not of a class derived // from std::exception, but just a char*. That's a nuisance -- you just // have to know :-( catch (const char *s) { -#endif +# endif // Like above, see if NOX aborted because there was an exception // in a user callback. In that case, collate the errors if we can // (namely, if the user exception was derived from std::exception),