From: <br...@us...> - 2006-06-08 21:00:58
|
Revision: 3665 Author: brihaye Date: 2006-06-08 14:00:43 -0700 (Thu, 08 Jun 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3665&view=rev Log Message: ----------- index-of() no more forwards exceptions Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/functions/FunIndexOf.java Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/FunIndexOf.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/FunIndexOf.java 2006-06-08 19:43:51 UTC (rev 3664) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/FunIndexOf.java 2006-06-08 21:00:43 UTC (rev 3665) @@ -108,10 +108,13 @@ int j = 1; for (SequenceIterator i = args[0].iterate(); i.hasNext(); j++) { AtomicValue next = i.nextItem().atomize(); - if (GeneralComparison.compareAtomic(collator, next, srch, context.isBackwardsCompatible(), - Constants.TRUNC_NONE, Constants.EQ)) - //TODO : break here ? -pb - result.add(new IntegerValue(j)); + try { + if (GeneralComparison.compareAtomic(collator, next, srch, context.isBackwardsCompatible(), + Constants.TRUNC_NONE, Constants.EQ)) + result.add(new IntegerValue(j)); + } catch (XPathException e) { + //Ignore me : values can not be compared + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |