Skip to main content
ThrowsAnalyzer package icon

ThrowsAnalyzer

A production-ready Roslyn analyzer providing comprehensive exception handling analysis for C# code with 30 diagnostic rules and 16 automated code fixes. Features: • 30 diagnostic rules covering all exception patterns • 16 automated code fixes for one-click issue resolution • Exception flow analysis across method calls • Async/await exception pattern detection • Iterator (yield) exception analysis • Lambda and event handler exception detection • Best practices and design pattern suggestions • Hot path performance analysis • Result<T> pattern recommendations Detects: • Unhandled exceptions and missing try-catch blocks • Rethrow anti-patterns (throw ex vs throw) • Unreachable and empty catch clauses • Async void exceptions and unobserved tasks • Exceptions in loops (performance issues) • Custom exception naming violations • Exception-based control flow • Undocumented public API exceptions Automated Fixes: • Wrap code in try-catch blocks • Fix rethrow statements to preserve stack traces • Convert async void to async Task • Add XML exception documentation • Rename exception types to follow conventions • Move validation outside loops • Add Task observation (await, continuations) • And more! Perfect for: Code quality enforcement, automated code reviews, CI/CD integration, and teaching exception best practices.

Total Downloads
888
888
Published
Oct 27, 2025
Latest stable version

Install

.NET CLI
dotnet add package ThrowsAnalyzer --version 1.0.0-beta.1
Package Manager Console
Install-Package ThrowsAnalyzer -Version 1.0.0-beta.1
PackageReference
<PackageReference Include="ThrowsAnalyzer" Version="1.0.0-beta.1" />

Frameworks

No framework metadata available.

Dependencies

No declared dependencies.

Adoption guide

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

This version is marked prerelease. Validate its API and upgrade path before production use.

No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

How to read this guidance

Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.

Useful next steps

Move from package metadata to a concrete selection or review workflow.