morten      01/10/16 03:44:55

  Modified:    java/src/org/apache/xalan/xsltc/cmdline Transform.java
  Log:
  Modified error handling to extract messages from SAXException. This tool
  will also print the stack trace of the SAXException if the '-x' flag is
  specified (debug turned on).
  PR:           none
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.11      +15 -1     
xml-xalan/java/src/org/apache/xalan/xsltc/cmdline/Transform.java
  
  Index: Transform.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/cmdline/Transform.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Transform.java    2001/10/12 19:17:05     1.10
  +++ Transform.java    2001/10/16 10:44:54     1.11
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: Transform.java,v 1.10 2001/10/12 19:17:05 tmiller Exp $
  + * @(#)$Id: Transform.java,v 1.11 2001/10/16 10:44:54 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -239,6 +239,20 @@
                               _fileName+"'.");
            if (_allowExit) System.exit(-1);
           }
  +     catch (SAXException e) {
  +         Exception i = e.getException();
  +         if (_debug) {
  +             if (i != null)
  +                 i.printStackTrace();
  +             else
  +                 e.printStackTrace();
  +         }
  +         if (i != null)
  +             System.err.println("Error: "+i.getMessage());
  +         else
  +             System.err.println("Error: "+e.getMessage());
  +         if (_allowExit) System.exit(-1);
  +     }
        catch (Exception e) {
            if (_debug) e.printStackTrace();
            System.err.println("Error: "+e.getMessage());
  
  
  

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

Reply via email to