Issue #1869 Ensure RecordFactory throws NoPluginException when there is no plugin.
Former-commit-id:f49bcb30a9
[formerly5bb01374b9
] [formerly772ecd6e46
] [formerly58b51b725c
[formerly772ecd6e46
[formerly 50da6ea32b6d876d70d8c4d7a4914f5bb17b4c62]]] Former-commit-id:58b51b725c
Former-commit-id: fd2464a73f231b57a8dbc3163e7c274a17d5ebe4 [formerly414b679b0a
] Former-commit-id:b65f1d4da0
This commit is contained in:
parent
6f09a11696
commit
99f69f5b44
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