santiagopg    2002/07/20 16:55:48

  Modified:    java/src/org/apache/xalan/xsltc/compiler Import.java
                        Include.java
  Log:
  Report a decent error when the URI cannot be resolved.
  
  Revision  Changes    Path
  1.16      +9 -1      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Import.java
  
  Index: Import.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Import.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Import.java       17 Jul 2002 18:52:20 -0000      1.15
  +++ Import.java       20 Jul 2002 23:55:48 -0000      1.16
  @@ -115,6 +115,14 @@
                input = new InputSource(docToLoad);
            }
   
  +         // Return if we could not resolve the URL
  +         if (input == null) {
  +             final ErrorMsg msg = 
  +                 new ErrorMsg(ErrorMsg.FILE_NOT_FOUND_ERR, docToLoad, this);
  +             parser.reportError(Constants.FATAL, msg);
  +             return;
  +         }
  +
            SyntaxTreeNode root = parser.parse(input);
   
            if (root == null) return;
  
  
  
  1.19      +9 -1      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Include.java
  
  Index: Include.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Include.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Include.java      17 Jul 2002 18:52:20 -0000      1.18
  +++ Include.java      20 Jul 2002 23:55:48 -0000      1.19
  @@ -132,6 +132,14 @@
                }
            }
   
  +         // Return if we could not resolve the URL
  +         if (input == null) {
  +             final ErrorMsg msg = 
  +                 new ErrorMsg(ErrorMsg.FILE_NOT_FOUND_ERR, docToLoad, this);
  +             parser.reportError(Constants.FATAL, msg);
  +             return;
  +         }
  +
            final SyntaxTreeNode root = parser.parse(input);
            if (root == null) return;
            _included = parser.makeStylesheet(root);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to