Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit 00ec7af

Browse files
committed
tests fixes
1 parent f6bb828 commit 00ec7af

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/main/java/com/arangodb/tinkerpop/gremlin/client/ArangoDBGraphClient.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.arangodb.tinkerpop.gremlin.persistence.EdgeData;
2222
import com.arangodb.tinkerpop.gremlin.persistence.VertexData;
2323
import com.arangodb.tinkerpop.gremlin.structure.*;
24+
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalInterruptedException;
2425
import org.apache.tinkerpop.gremlin.structure.Direction;
2526
import org.apache.tinkerpop.gremlin.structure.Graph;
2627
import org.slf4j.Logger;
@@ -76,8 +77,14 @@ private ArangoDBExceptions() {
7677
* @param ex the ex
7778
* @return The ArangoDBClientException
7879
*/
79-
80+
// FIXME: match errors on code and error num instead of pattern matching on message string
8081
public static ArangoDBGraphException getArangoDBException(ArangoDBException ex) {
82+
if (ex.getCause() instanceof InterruptedException) {
83+
TraversalInterruptedException ie = new TraversalInterruptedException();
84+
ie.initCause(ex);
85+
throw ie;
86+
}
87+
8188
String errorMessage = ex.getMessage();
8289
Matcher m = ERROR_CODE.matcher(errorMessage);
8390
if (m.matches()) {

0 commit comments

Comments
 (0)