From 7e0182d8829a7929e26cdabc80d50e9dee10939c Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Thu, 28 Jul 2011 10:33:00 +0300 Subject: [PATCH] add more info on failure to derive xcontent --- .../java/org/elasticsearch/common/xcontent/XContentFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/XContentFactory.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/XContentFactory.java index 50497c069a0..704de7fa2cb 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/XContentFactory.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/XContentFactory.java @@ -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); }