You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2005/10/24 12:38:42 UTC

svn commit: r328027 - /cocoon/trunk/src/java/org/apache/cocoon/core/container/CoreServiceManager.java

Author: cziegeler
Date: Mon Oct 24 03:38:36 2005
New Revision: 328027

URL: http://svn.apache.org/viewcvs?rev=328027&view=rev
Log:
Different exception if initialization fails

Modified:
    cocoon/trunk/src/java/org/apache/cocoon/core/container/CoreServiceManager.java

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/container/CoreServiceManager.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/container/CoreServiceManager.java?rev=328027&r1=328026&r2=328027&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/container/CoreServiceManager.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/container/CoreServiceManager.java Mon Oct 24 03:38:36 2005
@@ -363,15 +363,25 @@
                         final Configuration configuration = new DefaultConfiguration( "", "-" );
 
                         handler = this.getComponentHandler(role,
-                                                       info.getServiceClassName(),
-                                                       configuration.getChild(role),
-                                                       info);
+                                                           info.getServiceClassName(),
+                                                           configuration.getChild(role),
+                                                           info);
 
-                        handler.initialize();
                     } catch (ServiceException se) {
                         throw se;
                     } catch( final Exception e ) {
                         final String message = "Could not find component for role [" + role + "]";
+                        if( this.getLogger().isDebugEnabled() ) {
+                            this.getLogger().debug( message, e );
+                        }
+                        throw new ServiceException( role, message, e );
+                    }
+                    try {
+                        handler.initialize();
+                    } catch (ServiceException se) {
+                        throw se;
+                    } catch( final Exception e ) {
+                        final String message = "Could not create component for role [" + role + "]: " + handler.getClass();
                         if( this.getLogger().isDebugEnabled() ) {
                             this.getLogger().debug( message, e );
                         }