rem: window.dump("Error while loading assessments: " + e); 
add: if (debug) window.dump("Error while loading assessments: " + e); 
context: XRaiLoad = function() {   this.nsResolver = xpe.createNSResolver(XRai.getRoot());   this.loadErrors = 0;   if (debug) {      window.dump("\n\nLOADING\n");      window.dump("NS resolver: xraic = " + this.nsResolver.lookupNamespaceURI("xraic") + "; xrai = " + this.nsResolver.lookupNamespaceURI("xrai") + "\n");   }   this.add = function(start,end,a) {      try {         if (debug) window.dump("Loading " + start + " - " + end + " (" + a + ")\n");         start = start.replace(/\/(?!xrai:)/g,"/xraic:");         end = end.replace(/\/(?!xrai:)/g,"/xraic:");         var eStart = xpe.evaluate("." + start, XRai.getRoot().parentNode, this.nsResolver, 0, null).iterateNext();         var eEnd = end == "" ? null : xpe.evaluate("." + end, XRai.getRoot().parentNode, this.nsResolver, 0, null).iterateNext();         if (!eStart || (end != "" && !eEnd)) {            window.dump("Error: " + eStart + "/" + eEnd + "\n");            this.loadErrors++;         } else {            if (eEnd) {               try {                  new Passage(eStart, eEnd, a == "" ? null : a);               } catch(e) {                  this.loadErrors++;                  if (debug) window.dump("/!\\" + e + "\n");               }            } else {               if (!eStart.cAssessment) eStart.cAssessment = XRai.newAssessment(eStart,a,false,a);               else this.loadErrors++;               eStart.cAssessment.saved = XRai.getAValue(eStart.cAssessment);            }         }      } catch(e) {         window.dump("Error while loading assessments: " + XRai.getError(e));         this.loadErrors++;      }   }   this.end = function() {      if (this.loadErrors != 0)         alert("Error while loading assessments. You MUST NOT assess this file");      try {         // Update containers         for(var p = XRai.firstPassage; p; p = p.next)            if (p.validated) p.validate();         for(var p = XRai.firstOldPassage; p; p = p.next)            if (p.validated) p.validate();            else throw Error("An element in the old list should be validated!");         if (XRai.firstOldPassage) docStatus = 0;         XRai.updateSaveIcon();         XRai.updateStatusIcon();         if (debug) XRai.dumpPassages();      } catch(e) {         window.dump("Error while loading assessments: " + e);         alert("Error while loading assessments to this document. You MUST NOT assess this file");         throw e;      }   }}
meta: 8632	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8632/118a48a7c56edb8af49d2c17b204d65bb2149adb/article.js/clean/trunk/js/article.js