Re: svn commit: r1552249 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1552249 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java

Adrian Crum-3
Actually, the extra logging was not necessary in that case because the
exception will be caught in the outer try-catch block. In this case, the
calling code is in the same method.

Adrian Crum
Sandglass Software
www.sandglass-software.com

On 12/19/2013 3:08 AM, [hidden email] wrote:

> Author: jleroux
> Date: Thu Dec 19 08:08:16 2013
> New Revision: 1552249
>
> URL: http://svn.apache.org/r1552249
> Log:
> Even if I don't like much never-ending stacks in logs, this adds a log error in case the exception would be swallowed (recommended practice)
>
> Modified:
>      ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
>
> Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java?rev=1552249&r1=1552248&r2=1552249&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original)
> +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Thu Dec 19 08:08:16 2013
> @@ -2518,7 +2518,8 @@ public class GenericDelegator implements
>                           sequencer = this.AtomicRefSequencer.get();
>                       }
>                   } catch (Exception e) {
> -                    throw new IllegalStateException("Exception thrown while creating AtomicReference<SequenceUtil>: " + e);
> +                    Debug.logError(e, "Exception thrown while creating AtomicReference<SequenceUtil>", module);
> +                    throw new IllegalStateException("Error thrown while creating AtomicReference<SequenceUtil> in getNextSeqIdLong()" + e);
>                   }
>               }
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1552249 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java

Jacques Le Roux
Administrator
Right, too fast, I did not notice pat point, I will remove

Jacques

On Thursday, December 19, 2013 1:13 PM Adrian Crum [hidden email]

> Actually, the extra logging was not necessary in that case because the
> exception will be caught in the outer try-catch block. In this case, the
> calling code is in the same method.
>
> Adrian Crum
> Sandglass Software
> www.sandglass-software.com
>
> On 12/19/2013 3:08 AM, [hidden email] wrote:
>> Author: jleroux
>> Date: Thu Dec 19 08:08:16 2013
>> New Revision: 1552249
>>
>> URL: http://svn.apache.org/r1552249
>> Log:
>> Even if I don't like much never-ending stacks in logs, this adds a log error in case the exception would be swallowed
>> (recommended practice)
>>
>> Modified:
>>      ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
>>
>> Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java?rev=1552249&r1=1552248&r2=1552249&view=diff
>> ============================================================================== ---
>> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original) +++
>> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Thu Dec 19 08:08:16 2013 @@ -2518,7 +2518,8 @@ public
>>                           class GenericDelegator implements sequencer = this.AtomicRefSequencer.get();
>>                       }
>>                   } catch (Exception e) {
>> -                    throw new IllegalStateException("Exception thrown while creating AtomicReference<SequenceUtil>: " + e);
>> +                    Debug.logError(e, "Exception thrown while creating AtomicReference<SequenceUtil>", module);
>> +                    throw new IllegalStateException("Error thrown while creating AtomicReference<SequenceUtil> in
>>                   getNextSeqIdLong()" + e); }
>>               }