Skip to content

Commit

Permalink
XmlReader: attempt to show correct line number for "custom" errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cbjeukendrup committed Jan 10, 2025
1 parent c6c09a1 commit a4c6a29
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/framework/global/serialization/xmlstreamreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,10 @@ double XmlStreamReader::readDouble(bool* ok)

int64_t XmlStreamReader::lineNumber() const
{
if (!m_xml->doc.Error() && m_xml->node) {
return m_xml->node->GetLineNum();
}

return m_xml->doc.ErrorLineNum();
}

Expand Down

0 comments on commit a4c6a29

Please sign in to comment.