[FIX] Исправлена отправка исключений

This commit is contained in:
Gravit 2019-05-29 08:22:37 +07:00
parent 2176221c8e
commit 377a4c921f

View file

@ -63,7 +63,7 @@ public ResultInterface get() throws InterruptedException, ExecutionException {
}
ResultInterface result = event.result;
waitEventHandler.requests.remove(event);
if (event.result.getType().equals("error")) {
if (event.result.getType().equals("error") || event.result.getType().equals("exception")) {
ErrorRequestEvent errorRequestEvent = (ErrorRequestEvent) event.result;
throw new ExecutionException(new RequestException(errorRequestEvent.error));
}
@ -80,7 +80,7 @@ public ResultInterface get(long timeout, TimeUnit unit) throws InterruptedExcept
}
ResultInterface result = event.result;
waitEventHandler.requests.remove(event);
if (event.result.getType().equals("error")) {
if (event.result.getType().equals("error") || event.result.getType().equals("exception")) {
ErrorRequestEvent errorRequestEvent = (ErrorRequestEvent) event.result;
throw new ExecutionException(new RequestException(errorRequestEvent.error));
}