Commits

Anonymous committed c2b953f

Fixing a JDK 1.4 dependency

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@28e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits 1304113

Comments (0)

Files changed (1)

src/java/com/opensymphony/xwork/util/CompoundRootAccessor.java

 
 import ognl.*;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 import java.beans.IntrospectionException;
 
 import java.util.Iterator;
  * @version $Revision$
  */
 public class CompoundRootAccessor implements PropertyAccessor, MethodAccessor, ClassResolver {
+    //~ Static fields/initializers /////////////////////////////////////////////
+
+    private final static Log log = LogFactory.getLog(CompoundRootAccessor.class);
+
     //~ Methods ////////////////////////////////////////////////////////////////
 
     public void setProperty(Map context, Object target, Object name, Object value) throws OgnlException {
                 }
             } catch (OgnlException e) {
                 if (e.getReason() != null) {
-                    throw new RuntimeException(e.getReason());
+                    final String msg = "Caught an Ognl exception while setting property " + name;
+                    log.error(msg, e);
+                    throw new RuntimeException(msg);
                 }
             } catch (IntrospectionException e) {
             }
                     }
                 } catch (OgnlException e) {
                     if (e.getReason() != null) {
-                        throw new RuntimeException(e.getReason());
+                        final String msg = "Caught an Ognl exception while getting property " + name;
+                        log.error(msg, e);
+                        throw new RuntimeException(msg);
                     }
                 } catch (IntrospectionException e) {
                 }