[
https://issues.apache.org/jira/browse/DAFFODIL-2594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17451252#comment-17451252
]
Mike Beckerle commented on DAFFODIL-2594:
-----------------------------------------
Investigating the code a bit, it's clear that the diagnostic line number
information is coming from the current infoset element, not from the context of
the current processor, which is the newVariableInstanceStart processor (aka
parser in the parse case).
Inside the current state maybeProcessor element, the processor does exist and
have the proper schemaFileLocation information on it for the statement.
So the issue is just when to use this processor information, vs. when to use
the current infoset element's ERD schemaFileLocation, and how to tell when to
use which.
> Diagnostic message has wrong line number for setVariable with an expression
> error
> ---------------------------------------------------------------------------------
>
> Key: DAFFODIL-2594
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2594
> Project: Daffodil
> Issue Type: Bug
> Components: Diagnostics
> Affects Versions: 3.1.0
> Reporter: Mike Beckerle
> Priority: Minor
>
> See test_setVariable_neg_line_info_01
> The line number given is the xs:schema element, which is useless. It should
> be the line number of the setVariable statement.
> A similar issue almost certainly will occur for dfdl:newVariableInstance if
> the default value expression gets a runtime error as well.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)