Tweak exception message
This commit is contained in:
parent
a0c41218ff
commit
2a57539a28
|
@ -210,7 +210,7 @@ public class PluginsService extends AbstractComponent {
|
|||
String oldPlugin = foundSettings.put(setting, plugin.v1().getName());
|
||||
if (oldPlugin != null) {
|
||||
throw new IllegalArgumentException("Cannot have additional setting [" + setting + "] " +
|
||||
"in plugin " + plugin.v1().getName() + ", already added in plugin " + oldPlugin);
|
||||
"in plugin [" + plugin.v1().getName() + "], already added in plugin [" + oldPlugin + "]");
|
||||
}
|
||||
}
|
||||
builder.put(settings);
|
||||
|
|
|
@ -78,8 +78,8 @@ public class PluginsServiceTests extends ESTestCase {
|
|||
} catch (IllegalArgumentException e) {
|
||||
String msg = e.getMessage();
|
||||
assertTrue(msg, msg.contains("Cannot have additional setting [foo.bar]"));
|
||||
assertTrue(msg, msg.contains("plugin additional-settings1"));
|
||||
assertTrue(msg, msg.contains("plugin additional-settings2"));
|
||||
assertTrue(msg, msg.contains("plugin [additional-settings1]"));
|
||||
assertTrue(msg, msg.contains("plugin [additional-settings2]"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue