[Minor] also log situations where no service state is returned
This commit is contained in:
parent
7414081cbc
commit
4e6f7a916f
|
@ -17,6 +17,10 @@ package li.strolch.service.api;
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
|
import ch.eitchnet.privilege.base.PrivilegeException;
|
||||||
|
import ch.eitchnet.privilege.model.Certificate;
|
||||||
|
import ch.eitchnet.privilege.model.PrivilegeContext;
|
||||||
|
import ch.eitchnet.utils.helper.StringHelper;
|
||||||
import li.strolch.agent.api.ComponentContainer;
|
import li.strolch.agent.api.ComponentContainer;
|
||||||
import li.strolch.agent.api.StrolchComponent;
|
import li.strolch.agent.api.StrolchComponent;
|
||||||
import li.strolch.exception.StrolchAccessDeniedException;
|
import li.strolch.exception.StrolchAccessDeniedException;
|
||||||
|
@ -24,10 +28,6 @@ import li.strolch.exception.StrolchException;
|
||||||
import li.strolch.runtime.configuration.ComponentConfiguration;
|
import li.strolch.runtime.configuration.ComponentConfiguration;
|
||||||
import li.strolch.runtime.configuration.RuntimeConfiguration;
|
import li.strolch.runtime.configuration.RuntimeConfiguration;
|
||||||
import li.strolch.runtime.privilege.PrivilegeHandler;
|
import li.strolch.runtime.privilege.PrivilegeHandler;
|
||||||
import ch.eitchnet.privilege.base.PrivilegeException;
|
|
||||||
import ch.eitchnet.privilege.model.Certificate;
|
|
||||||
import ch.eitchnet.privilege.model.PrivilegeContext;
|
|
||||||
import ch.eitchnet.utils.helper.StringHelper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||||
|
@ -168,6 +168,12 @@ public class DefaultServiceHandler extends StrolchComponent implements ServiceHa
|
||||||
} else if (serviceResult.getThrowable() != null) {
|
} else if (serviceResult.getThrowable() != null) {
|
||||||
logger.error("Reason: " + serviceResult.getThrowable().getMessage(), serviceResult.getThrowable());
|
logger.error("Reason: " + serviceResult.getThrowable().getMessage(), serviceResult.getThrowable());
|
||||||
}
|
}
|
||||||
|
} else if (serviceResult.getState() == null) {
|
||||||
|
logger.warn("Service " + service.getClass().getName() + " returned a null ServiceResultState!");
|
||||||
|
logger.warn(msg);
|
||||||
|
} else {
|
||||||
|
logger.warn("UNHANDLED SERVICE RESULT STATE: " + serviceResult.getState());
|
||||||
|
logger.warn(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue