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