Author: vitold
Date: 2009-03-27 04:06:18 -0400 (Fri, 27 Mar 2009)
New Revision: 2222
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/ParseXmlHelper.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/checker/beanchildren/impl/BeanChildrenCheckerImpl.java
Log:
minor
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/ParseXmlHelper.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/ParseXmlHelper.java 2009-03-27
05:56:12 UTC (rev 2221)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/ParseXmlHelper.java 2009-03-27
08:06:18 UTC (rev 2222)
@@ -54,7 +54,7 @@
}
if (classesList.size() == 0)
- throw new DefinitionException("Could not find '" + className +
"'");
+ throw new DefinitionException("Could not find '" + className +
"'", new DefinitionException(className + " not a Java type"));
if (classesList.size() == 1)
return classesList.get(0);
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/checker/beanchildren/impl/BeanChildrenCheckerImpl.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/checker/beanchildren/impl/BeanChildrenCheckerImpl.java 2009-03-27
05:56:12 UTC (rev 2221)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/checker/beanchildren/impl/BeanChildrenCheckerImpl.java 2009-03-27
08:06:18 UTC (rev 2222)
@@ -94,10 +94,15 @@
//TODO: bean child element declaring a parameter of the bean constructor
return;
}
- throw new DefinitionException();//bean child element can't be interpreted as
a Java class or interface or Java Annotation type
+ throw new DefinitionException(new DefinitionException(beanChildElement.getName()
+ " can't be interpreted as a Java class or interface or Java Annotation
type"));
}
catch(DefinitionException e)
{
+ if(!(e.getCause() instanceof DefinitionException))
+ {
+ throw new DefinitionException(e);
+ }
+
Element beanElement = beanChildElement.getParent();
Namespace beanNamespace = beanElement.getNamespace();
Namespace beanChildNamespace = beanChildElement.getNamespace();
Show replies by date