File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
core/src/main/java/com/arangodb/internal Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 32
32
import java .util .concurrent .CompletableFuture ;
33
33
import java .util .concurrent .CompletionException ;
34
34
35
+ import static com .arangodb .internal .ArangoErrors .ERROR_GRAPH_NOT_FOUND ;
36
+
35
37
public class ArangoGraphAsyncImpl extends InternalArangoGraph implements ArangoGraphAsync {
36
38
37
39
private final ArangoDatabaseAsync db ;
@@ -54,7 +56,7 @@ public CompletableFuture<Boolean> exists() {
54
56
Throwable e = err instanceof CompletionException ? err .getCause () : err ;
55
57
if (e instanceof ArangoDBException ) {
56
58
ArangoDBException aEx = (ArangoDBException ) e ;
57
- if (ArangoErrors .ERROR_GRAPH_NOT_FOUND . equals (aEx . getErrorNum () )) {
59
+ if (ArangoErrors .matches (aEx , 404 , ERROR_GRAPH_NOT_FOUND )) {
58
60
return false ;
59
61
}
60
62
}
Original file line number Diff line number Diff line change 29
29
30
30
import java .util .Collection ;
31
31
32
+ import static com .arangodb .internal .ArangoErrors .ERROR_GRAPH_NOT_FOUND ;
33
+ import static com .arangodb .internal .ArangoErrors .matches ;
34
+
32
35
/**
33
36
* @author Mark Vollmary
34
37
*/
@@ -52,7 +55,7 @@ public boolean exists() {
52
55
getInfo ();
53
56
return true ;
54
57
} catch (final ArangoDBException e ) {
55
- if (ArangoErrors . ERROR_GRAPH_NOT_FOUND . equals ( e . getErrorNum () )) {
58
+ if (matches ( e , 404 , ERROR_GRAPH_NOT_FOUND )) {
56
59
return false ;
57
60
}
58
61
throw e ;
You can’t perform that action at this time.
0 commit comments