use of org.embulk.config.ConfigException in project embulk by embulk.
the class PluginManager method buildPluginNotFoundException.
private static ConfigException buildPluginNotFoundException(Class<?> iface, PluginType type, List<PluginSourceNotMatchException> exceptions) {
StringBuilder message = new StringBuilder();
message.append(String.format("%s '%s' is not found.", iface.getSimpleName(), type.getName()));
for (PluginSourceNotMatchException exception : exceptions) {
Throwable cause = (exception.getCause() == null ? exception : exception.getCause());
if (cause.getMessage() != null) {
message.append(String.format("%n"));
message.append(cause.getMessage());
}
}
ConfigException e = new ConfigException(message.toString());
for (PluginSourceNotMatchException exception : exceptions) {
e.addSuppressed(exception);
}
return e;
}
Aggregations