logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remko Popma <remko.po...@gmail.com>
Subject Re: svn commit: r1609602 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
Date Fri, 11 Jul 2014 14:10:25 GMT
You don't think that my point that we are creating an optional JndiLookup
and any failure (where reasonable) should be ignored is a valid one?


On Fri, Jul 11, 2014 at 11:08 PM, Gary Gregory <garydgregory@gmail.com>
wrote:

> On Fri, Jul 11, 2014 at 10:01 AM, Remko Popma <remko.popma@gmail.com>
> wrote:
>
>> If you want to modify this to only catch Exception and VerifyError, go
>> ahead.
>>
>
> Or only VerifyError since this is the exact problem encountered?
>
> Gary
>
>
>>
>> On Fri, Jul 11, 2014 at 10:28 PM, Gary Gregory <garydgregory@gmail.com>
>> wrote:
>>
>>> On Fri, Jul 11, 2014 at 9:09 AM, Matt Sicker <boards@gmail.com> wrote:
>>>
>>>> Some Errors aren't worth catching, though. Actually, most of them.
>>>> Maybe it is worth catching VerifyError explicitly?
>>>>
>>>
>>> Some error you probably shouldn't catch, for example, when you are out
>>> of memory.
>>>
>>> Gary
>>>
>>>>
>>>>
>>>> On 10 July 2014 22:53, Remko Popma <remko.popma@gmail.com> wrote:
>>>>
>>>>> I think catching Throwable is fine. It is better for the user if all
>>>>> Errors here are trapped and handled IMO.
>>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>> On 2014/07/11, at 11:48, Gary Gregory <garydgregory@gmail.com>
wrote:
>>>>>
>>>>> Or should we catch Exception and VerifyError, but not Throwable?
>>>>>
>>>>> Gary
>>>>>
>>>>>
>>>>> On Thu, Jul 10, 2014 at 9:26 PM, <mattsicker@apache.org> wrote:
>>>>>
>>>>>> Author: mattsicker
>>>>>> Date: Fri Jul 11 01:26:18 2014
>>>>>> New Revision: 1609602
>>>>>>
>>>>>> URL: http://svn.apache.org/r1609602
>>>>>> Log:
>>>>>> Catch Throwable here to handle VerifyError.
>>>>>>
>>>>>> Modified:
>>>>>>
>>>>>> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
>>>>>>
>>>>>> Modified:
>>>>>> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
>>>>>> URL:
>>>>>> http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java?rev=1609602&r1=1609601&r2=1609602&view=diff
>>>>>>
>>>>>> ==============================================================================
>>>>>> ---
>>>>>> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
>>>>>> (original)
>>>>>> +++
>>>>>> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
>>>>>> Fri Jul 11 01:26:18 2014
>>>>>> @@ -74,7 +74,7 @@ public class Interpolator implements Str
>>>>>>          lookups.put("env", new EnvironmentLookup());
>>>>>>          try {
>>>>>>              lookups.put("jndi", new JndiLookup());
>>>>>> -        } catch (Exception e) {
>>>>>> +        } catch (Throwable e) {
>>>>>>              // [LOG4J2-703] We might be on Android
>>>>>>              // java.lang.VerifyError:
>>>>>> org/apache/logging/log4j/core/lookup/JndiLookup
>>>>>>              LOGGER.warn(
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>> Java Persistence with Hibernate, Second Edition
>>>>> <http://www.manning.com/bauer3/>
>>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>> Blog: http://garygregory.wordpress.com
>>>>> Home: http://garygregory.com/
>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Matt Sicker <boards@gmail.com>
>>>>
>>>
>>>
>>>
>>> --
>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>> Java Persistence with Hibernate, Second Edition
>>> <http://www.manning.com/bauer3/>
>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>> Spring Batch in Action <http://www.manning.com/templier/>
>>> Blog: http://garygregory.wordpress.com
>>> Home: http://garygregory.com/
>>> Tweet! http://twitter.com/GaryGregory
>>>
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>

Mime
View raw message