From e454c5192551100c4af827d47299421c620ce8ad Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Thu, 28 Apr 2016 22:01:26 -0400 Subject: [PATCH] [Numerics] Show messages from std::exception in CVODES residual function --- src/numerics/CVodesIntegrator.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/numerics/CVodesIntegrator.cpp b/src/numerics/CVodesIntegrator.cpp index eeb552835..c42b2f0c1 100644 --- a/src/numerics/CVodesIntegrator.cpp +++ b/src/numerics/CVodesIntegrator.cpp @@ -50,8 +50,12 @@ extern "C" { } catch (CanteraError& err) { std::cerr << err.what() << std::endl; return 1; // possibly recoverable error + } catch (std::exception& err) { + std::cerr << "cvodes_rhs: unhandled exception:" << std::endl; + std::cerr << err.what() << std::endl; + return -1; // unrecoverable error } catch (...) { - std::cerr << "cvodes_rhs: unhandled exception" << std::endl; + std::cerr << "cvodes_rhs: unhandled exception of uknown type" << std::endl; return -1; // unrecoverable error } return 0; // successful evaluation