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 2019/03/19 12:57:29 UTC

[GitHub] [incubator-daffodil] stevedlawrence commented on issue #201: Fix bug in handling parse errors

stevedlawrence commented on issue #201: Fix bug in handling parse errors
URL: https://github.com/apache/incubator-daffodil/pull/201#issuecomment-474352208
 
 
   It looks like this change now causes a single test to fail:
   ```org.apache.daffodil.section23.dfdl_expressions.TestDFDLExpressions.test_int_constructor_04```
   
   The test expects the string "expression evaluation error". It used to get this error message:
   
   > Parse Error: Cannot convert 'not an int!' from String type to Long (Cannot convert to type long: For input string: "not an int!"). (within Expression Evaluation Error: Cannot convert 'not an int!' from String type to Long (Cannot convert to type long: For input string: "not an int!").
   
   But it now gets just this:
   
   > Parse Error: Cannot convert 'not an int!' from String type to Long (Cannot convert to type long: For input string: "not an int!").
   
   So we're losing the information that the parse error actually occurred in an expression evaluation error. There's definiately a lot of redundancy in that error message, but that fact that it occurred in an expression is useful information that I don't think we want to lose. Perhaps there's a different underlying issue here, like something using ProcessingError incorrectly? The bug mentions it's that maybeFormatString and maybeCause shouldn't both be passed in? Ifsomethign is using this incorrectly, maybe combining the paramters into a single paramter that is an ``Either[String,Throwable]`` would the type system figure out where we're doing something wrong.
   
   It would also be helpful if you could add a tdml test that reproduces the bad error so that we can ensure the test is fixed and does not regress in the future.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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