You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by jm...@apache.org on 2006/12/12 00:51:47 UTC

svn commit: r485970 - /incubator/xap/trunk/src/xap/xml/xmodify/CommandDirective.js

Author: jmargaris
Date: Mon Dec 11 16:51:47 2006
New Revision: 485970

URL: http://svn.apache.org/viewvc?view=rev&rev=485970
Log:
If XPAth results to zero results don't bomb out, just log
an issue

Modified:
    incubator/xap/trunk/src/xap/xml/xmodify/CommandDirective.js

Modified: incubator/xap/trunk/src/xap/xml/xmodify/CommandDirective.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/xmodify/CommandDirective.js?view=diff&rev=485970&r1=485969&r2=485970
==============================================================================
--- incubator/xap/trunk/src/xap/xml/xmodify/CommandDirective.js (original)
+++ incubator/xap/trunk/src/xap/xml/xmodify/CommandDirective.js Mon Dec 11 16:51:47 2006
@@ -21,6 +21,7 @@
 Xap.require("xap.xml.dom.Document");
 Xap.require("xap.util.LogFactory");
 Xap.require("google.xpath");
+Xap.require("xap.util.XapException");
  
 /**
  * @fileoverview An object embodying a particular operation (e.g., <code>append</code>) to be performed 
@@ -101,11 +102,17 @@
         
     // handle "no targets" case---
     var needsTarget = xap.xml.xmodify.CommandDirective._mustHaveTarget(directiveType) ;
+    
+    //if we need a target and don't have one log a message and continue
     if ( needsTarget && ( this._commandTargets.length == 0 ) ){
-        throw new 
-            xap.xml.xmodify.XmodifyException(
-                xap.xml.xmodify.XmodifyException.ZERO_RESULTS, 
-                this._selectAttr);
+    	if (xap.xml.xmodify.CommandDirective.s_log.isDebug() && xap.util.LogFactory.s_loggingEnabled){
+			xap.xml.xmodify.CommandDirective.s_log.debug(xap.util.XapException.exceptionToString(
+				new xap.xml.xmodify.XmodifyException(
+					xap.xml.xmodify.XmodifyException.ZERO_RESULTS, 
+					this._selectAttr)
+					));
+    	}
+		return;
     }
         
     /* @TODO: Switch on type, use ints, not strs */