Fix order of line number/position arguments to XsltException ctor#63344
Fix order of line number/position arguments to XsltException ctor#63344krwq merged 1 commit intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-xml Issue Detailsnull
|
| public override void CheckErrors() | ||
| { | ||
| throw new XsltException(SR.Xslt_InvalidXPath, new string[] { Expression }, _baseUri, _linePosition, _lineNumber, null); | ||
| throw new XsltException(SR.Xslt_InvalidXPath, new string[] { Expression }, _baseUri, _lineNumber, _linePosition, null); |
There was a problem hiding this comment.
Considering this only affects message suffix (An error occurred at {0}, ({1}, {2}).) it doesn't make much difference and hopefully people don't rely on that message and use properties instead. I'm wondering if for consistency with previous versions we should consider also swapping order when creating message: https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.Xml/src/System/Xml/Xslt/XsltException.cs#L126
I don't feel strongly either way
There was a problem hiding this comment.
I'm wondering if for consistency with previous versions we should consider also swapping order when creating message
I'm not following. Can you elaborate?
There was a problem hiding this comment.
with this change I assume we will swap the (col, row) in the error message with (row, col) for XSLT, it will be more consistent with rest of the XML but it will produce different message than on older versions.
There was a problem hiding this comment.
In all error/warning messages I am familiar with across various platforms, (row, col) seems to be the standard. It's also assumed by various tools such as VS. So it's the right fix IMO.
There was a problem hiding this comment.
with this change I assume we will swap the
(col, row)in the error message with(row, col)for XSLT, it will be more consistent with rest of the XML but it will produce different message than on older versions.
no, pr is simply fixing 4th and 5th arguments which were wrong before:
krwq
left a comment
There was a problem hiding this comment.
I'm ok with this change as it makes error message more consistent across XML
No description provided.