提交 dbf1ea07 编写于 作者: J Jesse Glick

If TopLevelItemDescriptor.newInstance throws a RuntimeException, why are we...

If TopLevelItemDescriptor.newInstance throws a RuntimeException, why are we wrapping it in an IllegalArgumentException?
Let it throw something like Failure and control the rendering.
上级 30ddc31e
......@@ -258,12 +258,7 @@ public abstract class ItemGroupMixIn {
if(parent.getItem(name)!=null)
throw new IllegalArgumentException("Project of the name "+name+" already exists");
TopLevelItem item;
try {
item = type.newInstance(parent,name);
} catch (Exception e) {
throw new IllegalArgumentException(e);
}
TopLevelItem item = type.newInstance(parent, name);
try {
callOnCreatedFromScratch(item);
} catch (AbstractMethodError e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册