Author: jfrederic.clere(a)jboss.com
Date: 2008-07-15 07:53:25 -0400 (Tue, 15 Jul 2008)
New Revision: 714
Modified:
trunk/java/org/apache/tomcat/jni/Library.java
trunk/java/org/apache/tomcat/jni/LibraryLoader.java
Log:
Remove the println and printStackTrace() and just keep the message part of the exception.
Modified: trunk/java/org/apache/tomcat/jni/Library.java
===================================================================
--- trunk/java/org/apache/tomcat/jni/Library.java 2008-07-14 16:39:43 UTC (rev 713)
+++ trunk/java/org/apache/tomcat/jni/Library.java 2008-07-15 11:53:25 UTC (rev 714)
@@ -43,6 +43,9 @@
loaded = true;
}
catch (Throwable e) {
+ if ( i > 0)
+ err += ", ";
+
String name = System.mapLibraryName(NAMES[i]);
String path = System.getProperty("java.library.path");
String sep = System.getProperty("path.separator");
@@ -50,11 +53,9 @@
for (int j=0; j<paths.length; j++) {
java.io.File fd = new java.io.File(paths[j] +
System.getProperty("file.separator") + name);
if (fd.exists()) {
- e.printStackTrace();
+ err += "(Error on: " + paths[j] +
System.getProperty("file.separator") + name +")";
}
}
- if ( i > 0)
- err += ", ";
err += e.getMessage();
}
if (loaded)
Modified: trunk/java/org/apache/tomcat/jni/LibraryLoader.java
===================================================================
--- trunk/java/org/apache/tomcat/jni/LibraryLoader.java 2008-07-14 16:39:43 UTC (rev 713)
+++ trunk/java/org/apache/tomcat/jni/LibraryLoader.java 2008-07-15 11:53:25 UTC (rev 714)
@@ -145,11 +145,10 @@
if (!optional) {
java.io.File fd = new java.io.File(fullPath);
if (fd.exists()) {
- d.printStackTrace();
+ throw new UnsatisfiedLinkError(" Error: " +
d.getMessage() + " " );
} else {
- System.out.println("Can't find: " + fullPath);
+ throw new UnsatisfiedLinkError(" Can't find: " +
fullPath + " ");
}
- throw new UnsatisfiedLinkError(dlibName);
}
}
}
Show replies by date