Permalink
Browse files

Improved error message for ConvertHandler

  • Loading branch information...
1 parent ebe43c6 commit 775b11e87d1672f9f205129bc9db33412594f3bd @chkal chkal committed Sep 7, 2012
@@ -109,12 +109,13 @@ public Object convert(Rewrite event, EvaluationContext context, Object value)
// let one of the SPI implementations build the converter
Iterator<ConverterProvider> providers = ServiceLoader.load(ConverterProvider.class).iterator();
while (providers.hasNext()) {
- converter = providers.next().getByType(converterClass);
+ ConverterProvider provider = providers.next();
+ converter = provider.getByType(converterClass);
if (converter != null) {
break;
}
}
- Assert.notNull(converter, "Could not build converter for type: " + converterClass.getName());
+ Assert.notNull(converter, "Got no result from any ConverterProvider for type: " + converterClass.getName());
return converter.convert(event, context, value);

0 comments on commit 775b11e

Please sign in to comment.