replace InvalidCursorStateException by IllegalStateException