Today in many places where we throw exceptions while parsing documents we use MapperParsingException. This exception does not hold the token location, which would be good to include in the error message, usually done by using XContentParseException which accepts the token location as a constructor argument.
We should either switch exception (would that have side effects?) or add the token location to the existing exception. It is a shame that it is possible to provide information back about where the parsing problem occurred, yet we don't take advantage of this.
Today in many places where we throw exceptions while parsing documents we use
MapperParsingException. This exception does not hold the token location, which would be good to include in the error message, usually done by usingXContentParseExceptionwhich accepts the token location as a constructor argument.We should either switch exception (would that have side effects?) or add the token location to the existing exception. It is a shame that it is possible to provide information back about where the parsing problem occurred, yet we don't take advantage of this.