-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep path in invalid project exceptions (#1287)
When #1004 moved the standard XML reading approach to be stream-based rather than file-based, the exceptions thrown on malformed XML changed--System.Xml no longer knows the path, so it isn't included in the XmlException. That caused MSBuild to fail to report the location of the XML error in a nice way as it had done before. Almost every case where we constructed a BuildEventFileInfo object already had access to the full path, so I added a constructor that accepted that as an argument and overrides the possibly-empty path returned from XmlException.SourceUri. Added a unit test to verify that the information is indeed preserved in the exception. Fixes #1286.
- Loading branch information
1 parent
fd25bc9
commit 4e405a8
Showing
4 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters