Improved IllegalStateException reporting.