Improving startup code

This commit is contained in:
Luca Frosini 2020-10-15 14:03:24 +02:00
parent 7ea388aec1
commit 48eeb52931
1 changed files with 4 additions and 2 deletions

View File

@ -67,8 +67,10 @@ public class SmartExecutorInitializator implements ApplicationManager {
try {
isPublisher.publishPlugins(availablePlugins);
}catch (Exception e) {
logger.error("Unable to create plugins is resources in context {}. The Service will be aborted", scope, e);
if(!(isPublisher instanceof RestISPublisher)) {
if(isPublisher instanceof RestISPublisher) {
logger.warn("Unable to create RunningPlugin in context {}. {}", scope, e.getMessage());
} else {
logger.error("Unable to create ServiceEndpoint in context {}. The Service will be aborted", scope, e);
throw new RuntimeException(e);
}
}