Better error message that displays the range that has the error.

Better error message that displays the range that has the error.