T
- public class ServiceLoaderWithExceptionControl<T> extends Object implements Iterable<T>
ServiceLoader
that ignores exception encountered when loading services.
The ServiceLoader
class throws an error when it encounters a service that it cannot load.
For ServiceConnectorCreator
, this can be a common occurrence due to missing dependencies.
For example, if an app isn't using MongoDB, thus not declaring dependencies on relevant classes,
will cause ServiceConnectorCreator
for MongoDB to fail. We don't want to abandon other service
connector creators in such cases.