/** * Checks the current application state and throws exceptions if errors have * been found. * * @throws InitializationException * - on application init failures */ private void checkApplicationState() throws InitializationException { // check all registered services final Collection<ServiceRegistryEntry<?>> failedServices = this.environment.services().checkStrictServices(); if (!failedServices.isEmpty()) { final String errorMessage = serviceRegistryErrorMessage(failedServices); throw new InitializationException(errorMessage); } }