Check converged reason after iterative solve completes.

In order to avoid continuing when a solve hasn't converged, we raise an exception when the solver fails to converge.