-
Notifications
You must be signed in to change notification settings - Fork 6k
Document System.Drawing OutOfMemoryException to ExternalException breaking change for .NET 10 with C# and VB examples #47939
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
Conversation
… for .NET 10 Co-authored-by: adegeo <67293991+adegeo@users.noreply.github.com>
docs/core/compatibility/core-libraries/10.0/system-drawing-outofmemory-externalexception.md
Outdated
Show resolved
Hide resolved
Co-authored-by: adegeo <67293991+adegeo@users.noreply.github.com>
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
docs/core/compatibility/windows-forms/10.0/system-drawing-outofmemory-externalexception.md
Show resolved
Hide resolved
…change Co-authored-by: adegeo <67293991+adegeo@users.noreply.github.com>
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
docs/core/compatibility/windows-forms/10.0/system-drawing-outofmemory-externalexception.md
Outdated
Show resolved
Hide resolved
Co-authored-by: adegeo <67293991+adegeo@users.noreply.github.com>
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
@gewarren This is ready |
docs/core/compatibility/windows-forms/10.0/system-drawing-outofmemory-externalexception.md
Outdated
Show resolved
Hide resolved
…fmemory-externalexception.md Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
This PR adds documentation for a breaking change in .NET 10 Preview 5 where System.Drawing's GDI+ error handling was updated to throw
ExternalException
instead ofOutOfMemoryException
forStatus.OutOfMemory
errors.Changes Made
Added new breaking change document:
docs/core/compatibility/windows-forms/10.0/system-drawing-outofmemory-externalexception.md
Status.OutOfMemory
for invalid input rather than actual memory issues, causing confusionUpdated main compatibility index:
docs/core/compatibility/10.0.md
Updated table of contents:
docs/core/compatibility/toc.yml
Background
GDI+ isn't particularly good at returning errors when it's unable to create internal objects. Many cases where object creation fails due to invalid input result in higher-level code getting a null and turning it into
Status.OutOfMemory
. This change toExternalException
provides more accurate error reporting since this exception type is already used in other System.Drawing code paths for similar GDI+ errors.The documentation follows established patterns and includes proper cross-references, code examples in both languages, and comprehensive coverage of affected APIs.
Fixes #46057.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.
Internal previews