On 23 May 2015 09:19:15 BST, Rainer Jung <rainer.j...@kippdata.de> wrote:
>Am 22.05.2015 um 16:55 schrieb ma...@apache.org:
>> Author: markt
>> Date: Fri May 22 14:55:06 2015
>> New Revision: 1681138
>>
>> URL: http://svn.apache.org/r1681138
>> Log:
>> Log errors processing LifecycleListener events and continue rather
>than allowing uncaught exception to propagate
>>
>> Modified:
>>      tomcat/trunk/java/org/apache/catalina/util/LifecycleBase.java
>>     
>tomcat/trunk/java/org/apache/catalina/util/LocalStrings.properties
>>
>> Modified:
>tomcat/trunk/java/org/apache/catalina/util/LifecycleBase.java
>> URL:
>http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/LifecycleBase.java?rev=1681138&r1=1681137&r2=1681138&view=diff
>>
>==============================================================================
>> --- tomcat/trunk/java/org/apache/catalina/util/LifecycleBase.java
>(original)
>> +++ tomcat/trunk/java/org/apache/catalina/util/LifecycleBase.java Fri
>May 22 14:55:06 2015
>> @@ -117,7 +117,13 @@ public abstract class LifecycleBase impl
>>           LifecycleEvent event = new LifecycleEvent(this, type,
>data);
>>           LifecycleListener interested[] = listeners;
>>           for (int i = 0; i < interested.length; i++) {
>> -            interested[i].lifecycleEvent(event);
>> +            try {
>> +                interested[i].lifecycleEvent(event);
>> +            } catch (Throwable t) {
>> +                ExceptionUtils.handleThrowable(t);
>> +                log.error(sm.getString("lifecycleBase.listenerFail",
>> +                        type, interested[i].getClass().getName()),
>t);
>> +            }
>>           }
>>       }
>
>Currently the unit test testWebappListenerConfigureFail() in 
>TestStandardContext fails due to the context startup with a 
>FailingLifecycleListener no longer throwing an exception.
>
>Regards,
>
>Rainer
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
>For additional commands, e-mail: dev-h...@tomcat.apache.org

Feel free to revert my change  (I won't be near my laptop for a few days.). The 
bz issue needs a more careful look. It might end up as won't fix.  Throw during 
start, log during stop might work but I can't remember how this interacts with 
the error state.

Mark

Reply via email to