|
Christoph Neuroth created OFBIZ-5049:
---------------------------------------- Summary: Include complete stack trace in groovy script exception messages Key: OFBIZ-5049 URL: https://issues.apache.org/jira/browse/OFBIZ-5049 Project: OFBiz Issue Type: Improvement Components: framework Affects Versions: SVN trunk Reporter: Christoph Neuroth When a groovy script fails, currently you can only follow the stack trace to org.ofbiz.base.util.ScriptUtil.executeScript(ScriptUtil.java:348), but not into the failed script itself, which makes debugging really hard. This can easily be improved by wrapping the exception there: {code}- throw new IllegalArgumentException(errMsg); + throw new IllegalArgumentException(errMsg, e);{code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
[ https://issues.apache.org/jira/browse/OFBIZ-5049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13475574#comment-13475574 ] Jacques Le Roux commented on OFBIZ-5049: ---------------------------------------- This seems a good idea, but maybe another choice has been made before? If nobody see a problem I will follow Christoph's suggestion... > Include complete stack trace in groovy script exception messages > ---------------------------------------------------------------- > > Key: OFBIZ-5049 > URL: https://issues.apache.org/jira/browse/OFBIZ-5049 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Christoph Neuroth > > When a groovy script fails, currently you can only follow the stack trace to org.ofbiz.base.util.ScriptUtil.executeScript(ScriptUtil.java:348), but not into the failed script itself, which makes debugging really hard. > This can easily be improved by wrapping the exception there: > {code}- throw new IllegalArgumentException(errMsg); > + throw new IllegalArgumentException(errMsg, e);{code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-5049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux reassigned OFBIZ-5049: -------------------------------------- Assignee: Jacques Le Roux > Include complete stack trace in groovy script exception messages > ---------------------------------------------------------------- > > Key: OFBIZ-5049 > URL: https://issues.apache.org/jira/browse/OFBIZ-5049 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Christoph Neuroth > Assignee: Jacques Le Roux > > When a groovy script fails, currently you can only follow the stack trace to org.ofbiz.base.util.ScriptUtil.executeScript(ScriptUtil.java:348), but not into the failed script itself, which makes debugging really hard. > This can easily be improved by wrapping the exception there: > {code}- throw new IllegalArgumentException(errMsg); > + throw new IllegalArgumentException(errMsg, e);{code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-5049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-5049. ---------------------------------- Resolution: Fixed Fix Version/s: SVN trunk Thanks Christoph, Your patch is in trunk at r1398679 > Include complete stack trace in groovy script exception messages > ---------------------------------------------------------------- > > Key: OFBIZ-5049 > URL: https://issues.apache.org/jira/browse/OFBIZ-5049 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Christoph Neuroth > Assignee: Jacques Le Roux > Fix For: SVN trunk > > > When a groovy script fails, currently you can only follow the stack trace to org.ofbiz.base.util.ScriptUtil.executeScript(ScriptUtil.java:348), but not into the failed script itself, which makes debugging really hard. > This can easily be improved by wrapping the exception there: > {code}- throw new IllegalArgumentException(errMsg); > + throw new IllegalArgumentException(errMsg, e);{code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
| Free forum by Nabble | Edit this page |
