Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report LineNumber and file, when schema file could not be read #387

Open
Pretasoc opened this issue Jun 16, 2023 · 1 comment
Open

Report LineNumber and file, when schema file could not be read #387

Pretasoc opened this issue Jun 16, 2023 · 1 comment

Comments

@Pretasoc
Copy link

I'm currently generation classes for schema files, which often are not valid schema files themself. It would be nice, if the tool could report the line number, on which an exception was raised, when the schema file could not be read. An error message like The 'http://www.w3.org/2001/XMLSchema:element' element is not supported in this context. is not pretty helpful on itself.

I assume you are using System.Xml.XmlSchema.Read() at some point to read the schema file. The error handler of that function already reports the line number, if applicable.

@mganss
Copy link
Owner

mganss commented Jun 16, 2023

Good idea. Would be great if you could tackle that and create a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants