Skip to content

Add test case to ensure XML parse exceptions include filename and position #61572

@xersion22

Description

@xersion22

Description

Currently, XML parse exceptions already include the filename at the beginning of the message. However, there is no automated test to ensure that the filename and position are consistently included in the exception message.

To prevent regressions, I propose adding a dedicated test in
XmlFileLoaderTest that asserts the exception message contains:

The filename (e.g., services31.xml)

The error details (This element is not expected)

The position (line X, column Y)

This would cover the case discussed in #61493.

I’d be happy to prepare a PR adding this test

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions