How to catch this error?

BTW, I should have linked this writeup of the problem from another post: Status of integration, optimization, and nl solvers - #14 by amrods