public static ModuleConfigurationException fromBindException(String name, ModuleType type, BindException e) {
		StringBuilder sb = new StringBuilder("Error with option(s) for module ");
		sb.append(name).append(" of type ").append(type.name()).append(":");

		List<FieldError> errors = e.getBindingResult().getFieldErrors();
		for (FieldError error : errors) {
			sb.append("\n    ").append(error.getField()).append(": ").append(error.getDefaultMessage());
		}

		ModuleConfigurationException result = new ModuleConfigurationException(sb.toString(), e);
		return result;
	}
Construct an exception following a configuration exception on a particular module.
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/plugins/ModuleConfigurationException.java