[jboss-cvs] jboss-seam/src/main/org/jboss/seam/init ...

Shane Bryzak sbryzak at redhat.com
Wed Aug 22 00:25:48 EDT 2007


  User: sbryzak2
  Date: 07/08/22 00:25:48

  Modified:    src/main/org/jboss/seam/init  Initialization.java
  Log:
  improved exception message for invalid component properties
  
  Revision  Changes    Path
  1.191     +13 -1     jboss-seam/src/main/org/jboss/seam/init/Initialization.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Initialization.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/init/Initialization.java,v
  retrieving revision 1.190
  retrieving revision 1.191
  diff -u -b -r1.190 -r1.191
  --- Initialization.java	6 Aug 2007 21:51:43 -0000	1.190
  +++ Initialization.java	22 Aug 2007 04:25:47 -0000	1.191
  @@ -386,7 +386,19 @@
            if (isProperty)
            {
               String qualifiedPropName = name + '.' + toCamelCase( prop.getQName().getName(), false );
  -            properties.put( qualifiedPropName, getPropertyValue(prop, replacements) );
  +            Conversions.PropertyValue propValue = null;
  +            try
  +            {
  +               propValue = getPropertyValue(prop, replacements);
  +               properties.put( qualifiedPropName, propValue );
  +            }
  +            catch (Exception ex)
  +            {
  +               throw new IllegalArgumentException(String.format(
  +                        "Exception setting property %s on component %s.  Expression %s evaluated to %s.",
  +                        qualifiedPropName, name, prop.getValue(), propValue), ex);
  +                        
  +            }
            }
         }
      }
  
  
  



More information about the jboss-cvs-commits mailing list