Embed caught exception as inner exception

Proprietary

When rethrowing a different exception in a catch block, pass the original exception as the inner exception to preserve the stack trace.

OpenRewrite.Recipes.CSharp.CodeQuality.Style.FindEmbedCaughtExceptionAsInner
mod run . --recipe=OpenRewrite.Recipes.CSharp.CodeQuality.Style.FindEmbedCaughtExceptionAsInner

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