[Numerics] Show messages from std::exception in CVODES residual function

This commit is contained in:
Ray Speth 2016-04-28 22:01:26 -04:00
parent cd77a94588
commit e454c51925

View file

@ -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