I am trying to solve a system of differential equations where I run into a larger Maxiters needed
warning. I suspect that my model has been ill-specified as this appears only for certain parameter values. To figure this out, I would like to log my system state when the solver encounters this error. So far I have tried try-catch
blocks, but they apparently don’t catch warnings but only errors.
Is there any neat way of implementing this?