bloritsch 02/01/10 12:03:16 Modified: src/java/org/apache/cocoon Main.java Log: make 404 errors no longer fatal on CLI operation Revision Changes Path 1.5 +15 -11 xml-cocoon2/src/java/org/apache/cocoon/Main.java Index: Main.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/Main.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Main.java 10 Jan 2002 17:37:57 -0000 1.4 +++ Main.java 10 Jan 2002 20:03:16 -0000 1.5 @@ -97,7 +97,7 @@ * Command line entry point. * * @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a> - * @version CVS $Revision: 1.4 $ $Date: 2002/01/10 17:37:57 $ + * @version CVS $Revision: 1.5 $ $Date: 2002/01/10 20:03:16 $ */ public class Main { @@ -557,18 +557,22 @@ while (links.size() > 0) { String url = (String)links.get(0); if (allProcessedLinks.get(url) == null) { - if (xspOnly) { - this.processXSP(url); - } else if (this.followLinks) { - i = this.processURI(url).iterator(); - while (i.hasNext() == true) { - next = (String)i.next(); - if (links.contains(next) == false) { - links.add(next); + try { + if (xspOnly) { + this.processXSP(url); + } else if (this.followLinks) { + i = this.processURI(url).iterator(); + while (i.hasNext() == true) { + next = (String)i.next(); + if (links.contains(next) == false) { + links.add(next); + } } + } else { + this.processURI(url); } - } else { - this.processURI(url); + } catch (ResourceNotFoundException rfne) { + log.warn(" Could not process uri: " + url); } } links.remove(url);
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]