mcconnell 2003/08/20 01:28:04
Modified: merlin/kernel/bootstrap/src/etc merlin.properties
merlin/kernel/impl/src/java/org/apache/avalon/merlin/kernel/impl
CLIKernelLoader.java
Log:
Correct a bug that occurs under 1.3.1 when propergating an exception.
Revision Changes Path
1.6 +14 -13 avalon-sandbox/merlin/kernel/bootstrap/src/etc/merlin.properties
Index: merlin.properties
===================================================================
RCS file:
/home/cvs/avalon-sandbox/merlin/kernel/bootstrap/src/etc/merlin.properties,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- merlin.properties 19 Aug 2003 05:45:15 -0000 1.5
+++ merlin.properties 20 Aug 2003 08:28:04 -0000 1.6
@@ -27,18 +27,19 @@
#
# the bootstrap classpath
#
-merlin.impl.classpath.length=14
+merlin.impl.classpath.length=15
merlin.impl.classpath.0=xerces:xerces;2.2.1
merlin.impl.classpath.1=xml-apis:xml-apis;1.0.b2
-merlin.impl.classpath.2=avalon-framework:avalon-framework-impl;SNAPSHOT
-merlin.impl.classpath.3=avalon-meta:avalon-meta-impl;SNAPSHOT
-merlin.impl.classpath.4=avalon-extension:avalon-extension-impl;SNAPSHOT
-merlin.impl.classpath.5=avalon-composition:avalon-composition-impl;SNAPSHOT
-merlin.impl.classpath.6=avalon-activation:avalon-activation-impl;SNAPSHOT
-merlin.impl.classpath.7=excalibur-i18n:excalibur-i18n;1.0
-merlin.impl.classpath.8=avalon-repository:avalon-repository-impl;SNAPSHOT
-merlin.impl.classpath.9=commons-cli:commons-cli;1.0
-merlin.impl.classpath.10=merlin:merlin-kernel-impl;SNAPSHOT
-merlin.impl.classpath.11=logkit:logkit;1.2
-merlin.impl.classpath.12=excalibur-event:excalibur-event;1.0.3
-merlin.impl.classpath.13=excalibur-configuration:excalibur-configuration;1.1-dev
+merlin.impl.classpath.2=xalan:xalan;2.3.1
+merlin.impl.classpath.3=avalon-framework:avalon-framework-impl;SNAPSHOT
+merlin.impl.classpath.4=avalon-meta:avalon-meta-impl;SNAPSHOT
+merlin.impl.classpath.5=avalon-extension:avalon-extension-impl;SNAPSHOT
+merlin.impl.classpath.6=avalon-composition:avalon-composition-impl;SNAPSHOT
+merlin.impl.classpath.7=avalon-activation:avalon-activation-impl;SNAPSHOT
+merlin.impl.classpath.8=excalibur-i18n:excalibur-i18n;1.0
+merlin.impl.classpath.9=avalon-repository:avalon-repository-impl;SNAPSHOT
+merlin.impl.classpath.10=commons-cli:commons-cli;1.0
+merlin.impl.classpath.11=merlin:merlin-kernel-impl;SNAPSHOT
+merlin.impl.classpath.12=logkit:logkit;1.2
+merlin.impl.classpath.13=excalibur-event:excalibur-event;1.0.3
+merlin.impl.classpath.14=excalibur-configuration:excalibur-configuration;1.1-dev
1.9 +26 -3
avalon-sandbox/merlin/kernel/impl/src/java/org/apache/avalon/merlin/kernel/impl/CLIKernelLoader.java
Index: CLIKernelLoader.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/merlin/kernel/impl/src/java/org/apache/avalon/merlin/kernel/impl/CLIKernelLoader.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- CLIKernelLoader.java 19 Aug 2003 07:34:30 -0000 1.8
+++ CLIKernelLoader.java 20 Aug 2003 08:28:04 -0000 1.9
@@ -118,12 +118,19 @@
System.out.println( "");
return;
}
+ catch( KernelException e )
+ {
+ final String error =
+ ExceptionHelper.packException( e.getMessage(), e.getCause(), true );
+ System.err.println( error );
+ return;
+ }
catch( Throwable e )
{
final String error =
- "\nInternal error while attempting to create kernel context.";
+ "Internal error while attempting to create kernel context.";
String msg =
- ExceptionHelper.packException( error, e, context.getDebugFlag() );
+ ExceptionHelper.packException( error, e, true );
System.err.println( msg );
return;
}
@@ -230,6 +237,7 @@
// get the system path for extension resolution
//
+
File system = getSystemPath( line );
//
@@ -254,8 +262,23 @@
// create the kernel
//
- return new DefaultKernelContext(
+ try
+ {
+ return new DefaultKernelContext(
repository, system, library, home, kernel, blocks, config, server,
debug );
+ }
+ catch( KernelException e )
+ {
+ final String error =
+ "Kernel context instantiation error.";
+ throw new KernelException( error, e );
+ }
+ catch( Throwable e )
+ {
+ final String error =
+ "Unexpected error during kernel context instantiation.";
+ throw new KernelException( error, e );
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]