[
https://issues.apache.org/jira/browse/DAFFODIL-823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dave Thompson closed DAFFODIL-823.
----------------------------------
Resolution: Fixed
This is no longer an issue.
The identified test (TestOCKImplicit.test_ockImplicit7) longer fails.
A clear error message has been added (below) and no longer results in the
referenced stack trace.
New error message:
<tdml:error>Schema Definition Error</tdml:error>
<tdml:error>occursCountKind='implicit' with unbounded maxOccurs only
allowed for last element of a positional sequence</tdml:error>
Modifying the error in the tdml test results a error message stating the error
could not be found in any of the diagnostic messages.
> Need clear error message when using string with maxOccurs="unbounded"
> occursCountKind="implicit" w/o maxLength specified
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: DAFFODIL-823
> URL: https://issues.apache.org/jira/browse/DAFFODIL-823
> Project: Daffodil
> Issue Type: Bug
> Components: Diagnostics, Middle "End", Usability
> Affects Versions: s11-M1
> Reporter: Josh Adams
> Priority: Minor
> Labels: beginner, reverify
>
> While working on DFDL-732, I was unaware that when creating a string element
> with maxOccurs="unbounded" and occursCountKind="implicit" you are required to
> speicify the max/minLength facets. Currently, if you don't it results in a
> very large, unhelpful stack trace:
> [error] Test
> edu.illinois.ncsa.daffodil.section14.occursCountKind.TestOCKImplicitNew.test_ockImplicit7
> failed: edu.illinois.ncsa.daffodil.processors.ParseError: Parse Error:
> StringFixedLengthInBytesFixedWidthCharacters - Exception:
> [error]
> edu.illinois.ncsa.daffodil.processors.DFDLByteReader.getByteArray(DFDLReader.scala:105)
> [error]
> edu.illinois.ncsa.daffodil.processors.InStreamFromByteChannel.getByteAlignedBytes(InStream.scala:246)
> [error]
> edu.illinois.ncsa.daffodil.processors.InStreamFromByteChannel.getBytes(InStream.scala:208)
> [error]
> edu.illinois.ncsa.daffodil.processors.StringLengthInBytes.parseInput(PrimitivesLengthKind.scala:161)
> [error]
> edu.illinois.ncsa.daffodil.processors.StringLength$$anon$1$$anonfun$parse$1.apply(PrimitivesLengthKind.scala:48)
> [error]
> edu.illinois.ncsa.daffodil.processors.StringLength$$anon$1$$anonfun$parse$1.apply(PrimitivesLengthKind.scala:38)
> [error]
> edu.illinois.ncsa.daffodil.processors.WithParseErrorThrowing$class.withParseErrorThrowing(Parser.scala:223)
> [error]
> edu.illinois.ncsa.daffodil.processors.PrimParser.withParseErrorThrowing(ProcessorBases.scala:9)
> [error]
> edu.illinois.ncsa.daffodil.processors.StringLength$$anon$1.parse(PrimitivesLengthKind.scala:38)
> [error] edu.illinois.ncsa.daffodil.processors.Parser.parse1(Parser.scala:135)
> [error]
> edu.illinois.ncsa.daffodil.processors.SeqCompParser$$anonfun$parse$3.apply(Parser.scala:336)
> [error]
> edu.illinois.ncsa.daffodil.processors.SeqCompParser$$anonfun$parse$3.apply(Parser.scala:334)
> [error]
> scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
> [error] scala.collection.immutable.List.foreach(List.scala:76)
> ..............................
--
This message was sent by Atlassian Jira
(v8.3.4#803005)