notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2509 - development/main/transit/core/handler/src/main/net/dpml/transit/host
- From: mcconnell AT dpml.net
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2509 - development/main/transit/core/handler/src/main/net/dpml/transit/host
- Date: Wed, 11 May 2005 11:37:46 +0000
Author: mcconnell AT dpml.net
Date: Wed May 11 11:37:44 2005
New Revision: 2509
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/host/PreferencesResourceManager.java
Log:
add a catch and error reporting
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/host/PreferencesResourceManager.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/host/PreferencesResourceManager.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/host/PreferencesResourceManager.java
Wed May 11 11:37:44 2005
@@ -34,9 +34,13 @@
import java.util.Properties;
import java.util.Date;
import java.lang.reflect.Constructor;
+import java.util.logging.Logger;
+import java.util.logging.Level;
import net.dpml.lang.NullArgumentException;
+import net.dpml.io.CascadingIOException;
+
import net.dpml.transit.Transit;
import net.dpml.transit.cache.CacheHandler;
import net.dpml.transit.TransitException;
@@ -284,8 +288,20 @@
private JarFile getTransitJarFile() throws IOException
{
URL url =
Transit.class.getProtectionDomain().getCodeSource().getLocation();
- File file = convertToFile( url );
- return new JarFile( file );
+ try
+ {
+ File file = convertToFile( url );
+ return new JarFile( file );
+ }
+ catch( Throwable e )
+ {
+ Logger logger = Logger.getLogger( "transit" );
+ final String error =
+ "Unexpected error occured while resolving Transit jar file."
+ + "\nCode-source URL: " + url;
+ logger.log( Level.SEVERE, error, e );
+ throw new CascadingIOException( error, e );
+ }
}
private void createResourceHostPreferences( String name, URL hostDef )
throws TransitException
- svn commit: r2509 - development/main/transit/core/handler/src/main/net/dpml/transit/host, mcconnell, 05/11/2005
Archive powered by MHonArc 2.6.24.