From 6ab044e3fd3883b86e45674032ef67946426ed2c Mon Sep 17 00:00:00 2001 From: hellkite500 Date: Wed, 26 Apr 2023 07:29:26 -0600 Subject: [PATCH] make sure not to loose python init error info on exception --- include/realizations/catchment/Bmi_Py_Adapter.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/realizations/catchment/Bmi_Py_Adapter.hpp b/include/realizations/catchment/Bmi_Py_Adapter.hpp index b817f032bd..5c7bfebfd4 100644 --- a/include/realizations/catchment/Bmi_Py_Adapter.hpp +++ b/include/realizations/catchment/Bmi_Py_Adapter.hpp @@ -674,6 +674,10 @@ namespace models { if (init_exception_msg.empty()) { init_exception_msg = "Unknown Python model initialization exception."; } + //This message is lost and often contains valuable info. Either need to break up and catch + //other possible exceptions, wrap all these in a custom exception, or at the very least, print + //the original messge before it gets lost in this re-throw. + std::cerr<