/[Apache-SVN]
ViewVC logotype

Revision 1734273


Jump to revision: Previous Next
Author: jleroux
Date: Wed Mar 9 15:37:36 2016 UTC (8 years, 1 month ago)
Changed paths: 2
Log Message:
"Applied fix from trunk for revision: 1734269" 
------------------------------------------------------------------------
r1734269 | jleroux | 2016-03-09 16:36:56 +0100 (mer. 09 mars 2016) | 7 lignes

A patch from Forrest Rae for "GroovyEngine.serviceInvoker masks Groovy script exceptions in some cases" https://issues.apache.org/jira/browse/OFBIZ-6888

If GroovyEngine.serviceInvoker catches an exception in a Groovy script, it would mask the exception in some cases.  An exception's detailMessage can be null.  If it is null, the exception won't be properly returned and logged, and that will make spotting problems very difficult.  This was the case for me while trying to track down a problem with a java.util.ConcurrentModificationException error in a Groovy script.  I suspect that this choice to mask exceptions and only return the message has cause bugs to not be spotted.

Disabling this for now in favor of returning a proper exception.  GroovyEngine.serviceInvoker() should throw GenericServiceException if error, rather than returning ServiceUtil.returnError(e.getMessage())


------------------------------------------------------------------------


Changed paths

Path Details
Directoryofbiz/branches/release12.04/ modified , props changed
Directoryofbiz/branches/release12.04/framework/service/src/org/ofbiz/service/engine/GroovyEngine.java modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26