HIGH

csharp/rethrow-loses-stack

`throw ex;` inside a catch. Rethrowing the variable restarts the stack trace at this method, so the frames between the fault and the catch are gone from the incident log. Use bare `throw;`, or `ExceptionDispatchInfo.Capture(ex).Throw()` outside the handler.

Decided by
a checker, with no model call — the deterministic tier
Severity means
merge is a deliberate trade-off a reviewer acknowledges. The output contract
Applies to
**/*.cs
Reaches
1 profile: service-dotnet
Defined in
standards/stacks/csharp.md:31

Read it in the terminal

The same facts, from the checkout you are already in — no browser, and no network.

terminal
$ npx redlinegate explain csharp/rethrow-loses-stack

Where this came from

You are most likely here from a review comment. A finding names its rule and, when your repository has told Redline where the standard is published, its address:

on the pull request
Redline/HIGH [csharp/rethrow-loses-stack]: …
  → …/r/csharp/rethrow-loses-stack

That second line is written by redline init --docs-url and is empty until an organisation sets one — there is no default, because a link to somebody else's copy of the standard is worse than no link. See Onboard a repository.

In context

The C# (.NET) standard lists this rule with the rest of its stack, in the file a reviewer and an AI assistant both read.

Other HIGH rules in this stack