You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Dave Thompson (Jira)" <ji...@apache.org> on 2021/01/14 15:06:00 UTC

[jira] [Updated] (DAFFODIL-823) Need clear error message when using string with maxOccurs="unbounded" occursCountKind="implicit" w/o maxLength specified

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

Dave Thompson updated DAFFODIL-823:
-----------------------------------
    Labels: beginner  (was: beginner reverify)

> 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 &quot;End&quot;, Usability
>    Affects Versions: s11-M1
>            Reporter: Josh Adams
>            Assignee: Dave Thompson
>            Priority: Minor
>              Labels: beginner
>             Fix For: 3.1.0
>
>
> 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)