greenrd     00/10/15 15:54:58

  Modified:    src/org/apache/cocoon/processor/xsp/library/fp fpError.java
                        fpResource.java
  Log:
  More informative exception information is now produced by taglibs
  
  Revision  Changes    Path
  1.2       +1 -1      
xml-cocoon/src/org/apache/cocoon/processor/xsp/library/fp/fpError.java
  
  Index: fpError.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xsp/library/fp/fpError.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- fpError.java      2000/07/21 20:12:53     1.1
  +++ fpError.java      2000/10/15 22:54:57     1.2
  @@ -108,7 +108,7 @@
                        errors.appendChild(msg);
                } catch (Exception e) {
                        e.printStackTrace();
  -                     System.out.println(e.getMessage());
  +                     System.out.println(e);
                }
                return errors;
        }
  
  
  
  1.3       +6 -7      
xml-cocoon/src/org/apache/cocoon/processor/xsp/library/fp/fpResource.java
  
  Index: fpResource.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xsp/library/fp/fpResource.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- fpResource.java   2000/07/21 23:39:22     1.2
  +++ fpResource.java   2000/10/15 22:54:57     1.3
  @@ -131,7 +131,7 @@
                                nodes = 
XPathAPI.selectNodeList(workDoc.getDocumentElement(), xpath);
                                //System.out.println("XPathAPI.selectNodeList 
called");
                        } catch (Exception ex) {
  -                             fpLibrary.reportError(errorNode, errorNode, 
errors, "Problem using the supplied XPath expression: " + xpath + " : " + 
ex.getMessage());
  +                             fpLibrary.reportError(errorNode, errorNode, 
errors, "Problem using the supplied XPath expression: " + xpath + " : " + ex);
                                ex.printStackTrace();
                        }
                        if (nodes != null && nodes.getLength() == 0) {
  @@ -183,7 +183,7 @@
                        try {
                                nodes = XPathAPI.selectNodeList(readNode, 
select, null);
                        } catch (Exception ex) {
  -                             fpLibrary.reportError(cNode, readNode, errors, 
"XPath expression error on:" + select + " : " + ex.getMessage());
  +                             fpLibrary.reportError(cNode, readNode, errors, 
"XPath expression error on:" + select + " : " + ex);
                                ex.printStackTrace();
                                return null;
                        }
  @@ -197,7 +197,6 @@
                                //      
e.appendChild((Element)XSPUtil.cloneNode(nodes.item(i), outDoc));
                                //}
                } catch (Exception ex) {
  -                     System.out.println(ex.getMessage());
                        ex.printStackTrace();
                }
                return fpLibrary.NodeList2Array(nodes);
  @@ -216,7 +215,7 @@
                                nodes = XPathAPI.selectNodeList(readNode, 
select, null);
                                //System.out.println("Found " + 
nodes.getLength() + " nodes");
                        } catch (Exception ex) {
  -                             fpLibrary.reportError(cNode, readNode, errors, 
"XPath expression error on:" + select + " : " + ex.getMessage());
  +                             fpLibrary.reportError(cNode, readNode, errors, 
"XPath expression error on:" + select + " : " + ex);
                                ex.printStackTrace();
                        }
                        if (nodes == null || nodes.getLength() == 0) {
  @@ -373,7 +372,7 @@
                try {
                        nodes = XPathAPI.selectNodeList(writeNode, select);
                } catch (Exception ex) {
  -                     //fpLibrary.reportError(currentNode, rootNode, "Cannot 
construct XPath: " + select + " : " + ex.getMessage());
  +                     //fpLibrary.reportError(currentNode, rootNode, "Cannot 
construct XPath: " + select + " : " + ex);
                        //errors = true;
                }
                /*if (nodes != null) {
  @@ -431,7 +430,7 @@
                        //System.out.println("Writing:" + val);
                        p.parse(new InputSource(new StringReader(val)));
                } catch (Exception ex) {
  -                     fpLibrary.reportError(cNode, errorNode, errors, "Cannot 
Parse: "  + ex.getMessage());
  +                     fpLibrary.reportError(cNode, errorNode, errors, "Cannot 
Parse: "  + ex);
                        ex.printStackTrace();
                        return null;
                }
  @@ -453,7 +452,7 @@
                        //System.out.println("parsed Document");
                } catch (Exception ex) {
                        //System.out.println("about to call reportError");
  -                     fpLibrary.reportError(errorNode, errorNode, errors, 
"Cannot Parse: " + f.toString() + " : " + ex.getMessage());
  +                     fpLibrary.reportError(errorNode, errorNode, errors, 
"Cannot Parse: " + f.toString() + " : " + ex);
                        //System.out.println("reportError called");
                        ex.printStackTrace();
                        return null;
  
  
  

Reply via email to