Updating documentation and using IllegalStateException.