You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (xv != ORows()){
throwstd::invalid_argument("size bad pls fix");
}
vs.
if (xv != ORows()){
std::string errStr = fmt::format("Dear Sir (or Madam),\n\tI regret to inform you that your GenericODE has internal size inconsistencies. You have told me that the ODE has {} X variables, but the output size of compute is {}. I wish you luck in correcting these issues posthaste.\nRegards,\nA.S.S.E.T.\n\nP.S. You may wish to begin your endeavor in '{}' on line {}.", xv, ORows(), __FILE__, __LINE__);
someLog.error(errStr);
throwstd::invalid_argument(errStr);
}
@wgledbetter Agreed, line numbers are already handled when the exception is thrown to python, but there is alot more information that we could and should provide in the error messages, regarding IO sizes, to help diagnose issues.
Any time an error is thrown as a result of evaluating a conditional, the arguments to the conditional should be embedded in the error message.
The text was updated successfully, but these errors were encountered: