incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmarga...@apache.org
Subject svn commit: r485970 - /incubator/xap/trunk/src/xap/xml/xmodify/CommandDirective.js
Date Tue, 12 Dec 2006 00:51:47 GMT
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 */



Mime
View raw message