You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by GitBox <gi...@apache.org> on 2018/10/31 13:36:10 UTC

[GitHub] stevedlawrence commented on a change in pull request #130: Initial commit

stevedlawrence commented on a change in pull request #130: Initial commit
URL: https://github.com/apache/incubator-daffodil/pull/130#discussion_r229694682
 
 

 ##########
 File path: daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/dfa/CreateDelimiterDFA.scala
 ##########
 @@ -116,6 +118,7 @@ object CreateDelimiterDFA {
 
   private def buildTransitions(delim: Seq[DelimBase],
     allStates: ArrayBuffer[State], ignoreCase: Boolean): State = {
+    System.out.println("Delim: " + delim)
     assert(!delim.isEmpty)
 
 Review comment:
   Changing from the scala assert() method to daffodils Assert.invariant() results in a stack trace that makes it a little easier to see what's going on. This is part of the stack trace:
   ```
   [error] org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:129)
   [error] org.apache.daffodil.processors.dfa.CreateDelimiterDFA$.buildTransitions(CreateDelimiterDFA.scala:123)
   [error] org.apache.daffodil.processors.dfa.CreateDelimiterDFA$.apply(CreateDelimiterDFA.scala:44)
   [error] org.apache.daffodil.processors.dfa.CreateDelimiterDFA$.apply(CreateDelimiterDFA.scala:83), took 1.291 sec
   [error]     at org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:129)
   [error]     at org.apache.daffodil.processors.dfa.CreateDelimiterDFA$.buildTransitions(CreateDelimiterDFA.scala:123)
   [error]     at org.apache.daffodil.processors.dfa.CreateDelimiterDFA$.apply(CreateDelimiterDFA.scala:44)
   [error]     at org.apache.daffodil.processors.dfa.CreateDelimiterDFA$.apply(CreateDelimiterDFA.scala:83)
   [error]     at org.apache.daffodil.processors.DelimiterUnparseEv.compute(EvDelimiters.scala:100)
   [error]     at org.apache.daffodil.processors.DelimiterUnparseEv.compute(EvDelimiters.scala:83)
   ```
   So the assert is getting called from the DelimiterUnparseEv. I suspect you just need to add logic to that Ev, similar to what you do for DelimiterParseEv.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services