[seam-commits] Seam SVN: r9421 - trunk/src/main/org/jboss/seam.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Oct 24 08:32:22 EDT 2008


Author: pete.muir at jboss.org
Date: 2008-10-24 08:32:22 -0400 (Fri, 24 Oct 2008)
New Revision: 9421

Modified:
   trunk/src/main/org/jboss/seam/Component.java
Log:
JBSEAM-3618

Modified: trunk/src/main/org/jboss/seam/Component.java
===================================================================
--- trunk/src/main/org/jboss/seam/Component.java	2008-10-24 12:23:01 UTC (rev 9420)
+++ trunk/src/main/org/jboss/seam/Component.java	2008-10-24 12:32:22 UTC (rev 9421)
@@ -956,17 +956,32 @@
 
    public void addInterceptor(Interceptor interceptor)
    {
-      if (interceptor.isInterceptorEnabled())
+      try
       {
-         if (interceptor.getType()==InterceptorType.SERVER) 
+         if (interceptor.isInterceptorEnabled())
          {
-            interceptors.add(interceptor);
+            if (interceptor.getType()==InterceptorType.SERVER) 
+            {
+               interceptors.add(interceptor);
+            }
+            else 
+            {
+               clientSideInterceptors.add(interceptor);
+            }
          }
-         else 
-         {
-            clientSideInterceptors.add(interceptor);
-         }
       }
+      catch (NoClassDefFoundError e)
+      {
+         log.debug("Unable to load interceptor " + interceptor, e);
+      }
+      catch (TypeNotPresentException e) 
+      {
+         log.debug("Unable to load interceptor " + interceptor, e);
+      }
+      catch (Exception e)
+      {
+         throw new IllegalArgumentException("Unable to load interceptor " + interceptor, e);
+      }
    }
 
    private List<Interceptor> newSort(List<Interceptor> list)
@@ -1030,12 +1045,22 @@
          {
             Class<?> clazz = Reflections.classForName(interceptorName);
             interceptorInstance = clazz.newInstance();
+            
          }
+         catch (NoClassDefFoundError e)
+         {
+            log.debug("Unable to load interceptor " + interceptorName, e);
+         }
+         catch (TypeNotPresentException e) 
+         {
+            log.debug("Unable to load interceptor " + interceptorName, e);
+         }
          catch (Exception e)
          {
             throw new IllegalArgumentException("Unable to load interceptor " + interceptorName, e);
          }
          addInterceptor(new Interceptor(interceptorInstance, this));
+         
       }
    }
    




More information about the seam-commits mailing list