ofbiz-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacques Le Roux (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (OFBIZ-6888) GroovyEngine.serviceInvoker masks Groovy script exceptions in some cases
Date Wed, 09 Mar 2016 15:39:40 GMT

     [ https://issues.apache.org/jira/browse/OFBIZ-6888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jacques Le Roux closed OFBIZ-6888.
----------------------------------
       Resolution: Fixed
    Fix Version/s: Upcoming Branch
                   13.07.03
                   12.04.06
                   14.12.01

Thanks Forrest,

Your patch is in
trunk r1734269
R15.12 r1734270
R14.12 r1734271
R13.07 r1734272
R12.04 r1734273




> GroovyEngine.serviceInvoker masks Groovy script exceptions in some cases
> ------------------------------------------------------------------------
>
>                 Key: OFBIZ-6888
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6888
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 13.07, Release Branch 14.12, Trunk, Release Branch
15.12
>            Reporter: Forrest Rae
>            Assignee: Jacques Le Roux
>              Labels: errorhandling
>             Fix For: 14.12.01, 12.04.06, 13.07.03, Upcoming Branch
>
>         Attachments: OFBIZ-6888.patch
>
>
> 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())



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message