ensureIndex() can display the error message:
point not in interval of [ -180, 180 )
The problem is that this error is vague and not very useful. It would be better if it dumped the offending record (or id) so we can fix the problem. Otherwise, we have to spend a lot of time tracking down which record is the culprit. Specifying --verbose does not improve this error message either.