Edit: You can also check the converged flag in the returned results class and raise this exception yourself it the model did not converge. For example,
dta = sm.datasets.spector.load_pandas()
y = dta.endog
X = dta.exog
X['const'] = 1
mod = sm.Logit(y, X).fit()
if not mod.mle_retvals['converged']:
do something else
Indeed, these warnings are printed. That's bad form. I filed an issue. PRs welcome on this.
https://github.com/statsmodels/statsmodels/issues/1281
Alternatively, try using another solver via the method keyword. Hopefully they'll raise a proper warning or an exception on the way.
If you can share the data that leads to this on that issue, then that would be helpful. There might be something else going on.