[
https://issues.apache.org/jira/browse/DAFFODIL-1492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Beckerle updated DAFFODIL-1492:
---------------------------------------
Labels: beginner (was: )
> Remove return statements to avoid NonLocalReturnControl errors
> --------------------------------------------------------------
>
> Key: DAFFODIL-1492
> URL: https://issues.apache.org/jira/browse/DAFFODIL-1492
> Project: Daffodil
> Issue Type: Improvement
> Components: Clean Ups
> Reporter: Taylor Wise
> Priority: Major
> Labels: beginner
>
> This was a pain in the butt to figure out. If you want to see what I'm
> talking about with it not telling you where the error is, try running the
> test specified in DFDL-929. It won't give you a stack trace or exception.
> You end up having to step through/into it to see where the exception is
> happening and that it appears to be a ControlThrowable. Unfortunately,
> NonLocalReturnControl does not include a stack trace. So there's no
> specifics on what is directly causing it.
> I ended up having to use the following in the terminal to figure out what the
> problem was:
> {code}SBT_OPTS="-Dscala.control.noTraceSuppression=false" sbt "debug:testOnly
> edu.illinois.ncsa.daffodil.section12.aligned_data.TestAlignedDataDebug --
> --tests=test_alignmentTerminatorBitSkip"{code}
> You can force it to print out a stack trace to bypass the fact that the
> NonLocalReturnControl suppresses it.
> The link I included in the objectives above tells you about the particular
> issue and how we should really not use return.
> {quote}When a function value containing a return statement is evaluated
> nonlocally, the computation is abandoned and the result is returned by
> throwing a NonLocalReturnControl[A]. {quote}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)