Исправления обработки ошибок
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
cb44dab413
commit
88beadb445
@ -151,15 +151,16 @@ public class GeneralAutoResponder<M extends Message> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void answer(UnitRequest<MainUnit<M>, M> unitRequest) {
|
public void answer(UnitRequest<MainUnit<M>, M> unitRequest) {
|
||||||
try {
|
if (checkNotNull(errorHandler)) {
|
||||||
|
try {
|
||||||
|
unitRequest = getAction(unitRequest);
|
||||||
|
activeUnitAfter(unitRequest);
|
||||||
|
} catch (Exception e) {
|
||||||
|
errorHandler.handle(unitRequest.getMessage(), e);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
unitRequest = getAction(unitRequest);
|
unitRequest = getAction(unitRequest);
|
||||||
activeUnitAfter(unitRequest);
|
activeUnitAfter(unitRequest);
|
||||||
} catch (Exception e) {
|
|
||||||
if (checkNotNull(errorHandler)) {
|
|
||||||
errorHandler.handle(unitRequest.getMessage(), e);
|
|
||||||
} else {
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user