Find catch (OutOfMemoryException) that may need ExternalException

Proprietary

In .NET 10, System.Drawing GDI+ errors now throw ExternalException instead of OutOfMemoryException. This recipe finds catch blocks that catch OutOfMemoryException which may need to also catch ExternalException.

OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net10.FindSystemDrawingExceptionChange
mod run . --recipe=OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net10.FindSystemDrawingExceptionChange

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.