morten 01/09/12 02:18:52
Modified: java/src/org/apache/xalan/xsltc/cmdline Transform.java
Log:
Modified some of the error messages that are reported by this command-line
tool to include full and correct error messages.
Revision Changes Path
1.5 +9 -11
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.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Transform.java 2001/08/14 09:16:45 1.4
+++ Transform.java 2001/09/12 09:18:52 1.5
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: Transform.java,v 1.4 2001/08/14 09:16:45 morten Exp $
+ * @(#)$Id: Transform.java,v 1.5 2001/09/12 09:18:52 morten Exp $
*
* The Apache Software License, Version 1.1
*
@@ -194,41 +194,39 @@
}
}
catch (TransletException e) {
+ if (_debug) e.printStackTrace();
System.err.println("\nTranslet Error: " + e.getMessage());
- if (_debug) {
- System.err.println(e.toString());
- e.printStackTrace();
- }
System.exit(-1);
}
catch (RuntimeException e) {
+ if (_debug) e.printStackTrace();
System.err.println("\nRuntime Error: " + e.getMessage());
- if (_debug) {
- System.err.println(e.toString());
- e.printStackTrace();
- }
System.exit(-1);
}
catch (FileNotFoundException e) {
+ if (_debug) e.printStackTrace();
System.err.println("Error: File or URI '"+_fileName+"' not found.");
System.exit(-1);
}
catch (MalformedURLException e) {
+ if (_debug) e.printStackTrace();
System.err.println("Error: Invalid URI '"+_fileName+"'.");
System.exit(-1);
}
catch (ClassNotFoundException e) {
+ if (_debug) e.printStackTrace();
System.err.println("Error: Cannot find class '"+_className+"'.");
System.exit(-1);
}
catch (UnknownHostException e) {
+ if (_debug) e.printStackTrace();
System.err.println("Error: Can't resolve URI specification '"+
_fileName+"'.");
System.exit(-1);
}
catch (Exception e) {
- e.printStackTrace();
- System.err.println("Error: internal error.");
+ if (_debug) e.printStackTrace();
+ System.err.println("Error: "+e.getMessage());
System.exit(-1);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]