diff --git a/src/main/java/org/gridsuite/voltageinit/server/service/VoltageInitWorkerService.java b/src/main/java/org/gridsuite/voltageinit/server/service/VoltageInitWorkerService.java index 91a507d..e6b0d9d 100644 --- a/src/main/java/org/gridsuite/voltageinit/server/service/VoltageInitWorkerService.java +++ b/src/main/java/org/gridsuite/voltageinit/server/service/VoltageInitWorkerService.java @@ -37,6 +37,7 @@ import java.util.concurrent.locks.ReentrantLock; import java.util.function.Consumer; +import static org.gridsuite.voltageinit.server.service.NotificationService.CANCEL_MESSAGE; import static org.gridsuite.voltageinit.server.service.NotificationService.FAIL_MESSAGE; /** @@ -141,6 +142,7 @@ private void cancelVoltageInitAsync(VoltageInitCancelContext cancelContext) { private void cleanVoltageInitResultsAndPublishCancel(UUID resultUuid, String receiver) { resultRepository.delete(resultUuid); notificationService.publishStop(resultUuid, receiver); + LOGGER.info(CANCEL_MESSAGE + " (resultUuid='{}')", resultUuid); } @Bean @@ -173,8 +175,8 @@ public Consumer> consumeRun() { } catch (InterruptedException e) { Thread.currentThread().interrupt(); } catch (Exception e) { - LOGGER.error(FAIL_MESSAGE, e); if (!(e instanceof CancellationException)) { + LOGGER.error(FAIL_MESSAGE, e); Map errorIndicators = new HashMap<>(); errorIndicators.put(ERROR, ERROR_DURING_VOLTAGE_PROFILE_INITIALISATION);