[Numerics] Show messages from std::exception in CVODES residual function
This commit is contained in:
parent
cd77a94588
commit
e454c51925
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue