MCPcopy Index your code
hub / github.com/ccxt/ccxt / reject

Method reject

java/lib/src/main/java/io/github/ccxt/ws/Future.java:39–49  ·  view source on GitHub ↗

Reject the future with an error.

(Object error)

Source from the content-addressed store, hash-verified

37 * Reject the future with an error.
38 */
39 public void reject(Object error) {
40 Exception exception;
41 if (error instanceof Exception ex) {
42 exception = ex;
43 } else if (error == null) {
44 exception = new RuntimeException("Future rejected with null");
45 } else {
46 exception = new RuntimeException("Future rejected: " + error);
47 }
48 this.completableFuture.completeExceptionally(exception);
49 }
50
51 /**
52 * Get the underlying CompletableFuture for awaiting.

Callers 7

testRejectMethod · 0.95
testRejectWithStringMethod · 0.95
testRaceWithRejectMethod · 0.95
spawnWithResultMethod · 0.95
futureMethod · 0.95
rejectMethod · 0.95
closeMethod · 0.95

Calls

no outgoing calls

Tested by 3

testRejectMethod · 0.76
testRejectWithStringMethod · 0.76
testRaceWithRejectMethod · 0.76