[tools] Honor the 'ProductException.Warning' field if nothing has been configured for an exception.#25856
Conversation
…n configured for an exception.
There was a problem hiding this comment.
Pull request overview
This PR updates the tool error/warning classification flow so ProductException.Warning is honored when no per-code warning configuration exists, while ensuring that true errors remain errors regardless of configuration defaults.
Changes:
- Added
ErrorHelper.TryGetWarningLevelto distinguish “no configuration found” from “configured to Warning”. - Updated
ProductException.IsError/GetWarningLevelto (a) always treat non-warning exceptions as errors and (b) only consult configured warning levels when present. - Mirrored the
ErrorHelperwarning-level lookup changes in the test helper implementation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/common/ErrorHelper.tools.cs | Adds TryGetWarningLevel and refactors GetWarningLevel to use it. |
| tools/common/error.cs | Fixes ProductException warning/error classification to consistently reflect the exception’s Warning field when unconfigured. |
| tests/common/ErrorHelper.tests.cs | Keeps the test helper ErrorHelper behavior consistent with the production implementation. |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #7f4565e] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [PR Build #7f4565e] Build passed (Build packages) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [PR Build #7f4565e] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #7f4565e] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 199 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
No description provided.