Merge "Issue #1869 Ensure RecordFactory throws NoPluginException when there is no plugin." into development
Former-commit-id: 38aa364a89d87896c2569026bc7e16a71babd308
This commit is contained in:
commit
0f7bf4dd6a
1 changed files with 10 additions and 1 deletions
|
@ -153,6 +153,15 @@ public class RecordFactory implements IPluginClassMapper {
|
|||
map.put("dataURI", dataURI);
|
||||
return map;
|
||||
} catch (Exception e) {
|
||||
// if this exception was caused by NoPlugin then throw that so that
|
||||
// caller knows exactly why this happened.
|
||||
Throwable cause = e.getCause();
|
||||
while (cause != null) {
|
||||
if (cause instanceof NoPluginException) {
|
||||
throw (NoPluginException) cause;
|
||||
}
|
||||
cause = cause.getCause();
|
||||
}
|
||||
throw new VizException("Unable to create property map for "
|
||||
+ dataURI, e);
|
||||
}
|
||||
|
@ -251,7 +260,7 @@ public class RecordFactory implements IPluginClassMapper {
|
|||
try {
|
||||
return getPluginClass(pluginName);
|
||||
} catch (NoPluginException e) {
|
||||
throw new PluginException(e.getLocalizedMessage());
|
||||
throw new PluginException(e.getLocalizedMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue