Included more info in GraphSON error messaging CTR

Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b5242254
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b5242254
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b5242254

Branch: refs/heads/TINKERPOP-1912
Commit: b52422547f39aea8c58ad1d6b5fb55c26947f7d6
Parents: 8c87fcf
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Mar 20 07:59:32 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Mar 20 07:59:32 2018 -0400

----------------------------------------------------------------------
 .../gremlin/structure/io/graphson/GraphSONTypeSerializer.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b5242254/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
index 8b1ba25..53ccc0b 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
@@ -105,7 +105,7 @@ public class GraphSONTypeSerializer extends TypeSerializer {
         } else if (writableTypeId.valueShape == JsonToken.START_ARRAY) {
             jsonGenerator.writeStartArray();
         } else {
-            throw new IllegalStateException("Could not write prefix");
+            throw new IllegalStateException("Could not write prefix: shape[" + 
writableTypeId.valueShape + "] value[" + writableTypeId.forValue + "]");
         }
 
         return writableTypeId;
@@ -122,7 +122,7 @@ public class GraphSONTypeSerializer extends TypeSerializer {
         } else if (writableTypeId.valueShape == JsonToken.START_ARRAY) {
             jsonGenerator.writeEndArray();
         } else {
-            throw new IllegalStateException("Could not write suffix");
+            throw new IllegalStateException("Could not write suffix: shape[" + 
writableTypeId.valueShape + "] value[" + writableTypeId.forValue + "]");
         }
 
         return writableTypeId;

Reply via email to