add more info on failure to derive xcontent

This commit is contained in:
Shay Banon 2011-07-28 10:33:00 +03:00
parent 36e6102a1b
commit 7e0182d882
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ public class XContentFactory {
public static XContent xContent(byte[] data, int offset, int length) {
XContentType type = xContentType(data, offset, length);
if (type == null) {
throw new ElasticSearchParseException("Failed to derive xcontent from " + Arrays.toString(data));
throw new ElasticSearchParseException("Failed to derive xcontent from (offset=" + offset + ", length=" + length + "): " + Arrays.toString(data));
}
return xContent(type);
}