Search in sources :

Example 11 with ConfigException

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;
}
Also used : ConfigException(org.embulk.config.ConfigException)

Aggregations

ConfigException (org.embulk.config.ConfigException)11 Schema (org.embulk.spi.Schema)8 Column (org.embulk.spi.Column)5 SchemaConfigException (org.embulk.spi.SchemaConfigException)5 ConfigSource (org.embulk.config.ConfigSource)3 TaskSource (org.embulk.config.TaskSource)3 FilterPlugin (org.embulk.spi.FilterPlugin)3 Test (org.junit.Test)3 ImmutableList (com.google.common.collect.ImmutableList)2 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 PatternSyntaxException (java.util.regex.PatternSyntaxException)1 TimestampFormatter (org.embulk.spi.time.TimestampFormatter)1 TimestampParser (org.embulk.spi.time.TimestampParser)1 BooleanType (org.embulk.spi.type.BooleanType)1 DoubleType (org.embulk.spi.type.DoubleType)1 JsonType (org.embulk.spi.type.JsonType)1 LongType (org.embulk.spi.type.LongType)1 StringType (org.embulk.spi.type.StringType)1 TimestampType (org.embulk.spi.type.TimestampType)1