Author: bombe
Date: 2006-05-08 23:23:07 +0000 (Mon, 08 May 2006)
New Revision: 8648
Modified:
trunk/freenet/src/freenet/clients/http/PageMaker.java
Log:
always log an exception if it occurs
Modified: trunk/freenet/src/freenet/clients/http/PageMaker.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/PageMaker.java 2006-05-07
23:28:36 UTC (rev 8647)
+++ trunk/freenet/src/freenet/clients/http/PageMaker.java 2006-05-08
23:23:07 UTC (rev 8648)
@@ -97,19 +97,14 @@
URL url = getClass().getResource("staticfiles/themes/");
URLConnection urlConnection = url.openConnection();
if (url.getProtocol().equals("file")) {
- try{
- File themesDirectory = new
File(URLDecoder.decode(url.getPath(), "ISO-8859-1").replaceAll("\\|", ":"));
- File[] themeDirectories =
themesDirectory.listFiles();
- for (int themeIndex = 0;
themeDirectories != null && themeIndex < themeDirectories.length; themeIndex++)
{
- File themeDirectory =
themeDirectories[themeIndex];
- if
(themeDirectory.isDirectory() && !themeDirectory.getName().startsWith(".")) {
-
themes.add(themeDirectory.getName());
- }
- }
- }catch(Exception e){
- Logger.error(this,"Error getting theme
list. "+e);
- }
-
+ File themesDirectory = new
File(URLDecoder.decode(url.getPath(), "ISO-8859-1").replaceAll("\\|", ":"));
+ File[] themeDirectories =
themesDirectory.listFiles();
+ for (int themeIndex = 0; themeDirectories !=
null && themeIndex < themeDirectories.length; themeIndex++) {
+ File themeDirectory =
themeDirectories[themeIndex];
+ if (themeDirectory.isDirectory() &&
!themeDirectory.getName().startsWith(".")) {
+
themes.add(themeDirectory.getName());
+ }
+ }
} else if (urlConnection instanceof JarURLConnection) {
JarURLConnection jarUrlConnection =
(JarURLConnection) urlConnection;
JarFile jarFile = jarUrlConnection.getJarFile();
@@ -130,6 +125,7 @@
jarThemesCache = themes;
}
} catch (IOException ioe1) {
+ Logger.error(this, "error creating list of themes",
ioe1);
} finally {
if (!themes.contains("aqua")) {
themes.add("aqua");