cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon Main.java
Date Thu, 10 Jan 2002 20:03:16 GMT
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:stefano@apache.org">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:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message