Skip to content

Commit 9cc32f2

Browse files
committed
Add more doc to a broken semgraph operation
1 parent 62e0bf0 commit 9cc32f2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/edu/stanford/nlp/semgraph/UnknownVertexException.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ public UnknownVertexException(IndexedWord vertex, SemanticGraph graph) {
1212
}
1313

1414
public String toString() {
15-
return super.toString() + ": Operation attempted on unknown vertex " + vertex + " in graph " + graph;
15+
if (vertex == null) {
16+
return super.toString() + ": Operation attempted on unknown vertex " + vertex + " in graph " + graph;
17+
} else {
18+
return super.toString() + ": Operation attempted on unknown vertex " + vertex + " (index " + vertex.index() + " sentIndex " + vertex.sentIndex() + ") in graph " + graph;
19+
}
1620
}
1721
}

0 commit comments

Comments
 (0)