
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
throwsanalyzer
Advanced tools
Comprehensive Exception Analysis for C# with Automated Code Fixes
ThrowsAnalyzer is a production-ready Roslyn analyzer that provides comprehensive exception handling analysis for C# codebases. It detects exception anti-patterns, enforces best practices, and provides automated code fixes—all integrated directly into your IDE.
✅ 30 Diagnostic Rules covering all exception patterns ✅ 16 Automated Code Fixes for one-click issue resolution ✅ Exception Flow Analysis across method calls ✅ Async/Await Pattern Detection for safe async code ✅ Iterator Exception Analysis for yield-based methods ✅ Lambda & Event Handler exception detection ✅ Performance Analysis for exceptions in hot paths ✅ Best Practices Enforcement (naming, patterns, design)
dotnet add package ThrowsAnalyzer
Or via NuGet Package Manager:
Install-Package ThrowsAnalyzer
Once installed, ThrowsAnalyzer automatically analyzes your code and provides:
throw ex; vs throw;)async void methods that throwTask exceptions// Before
catch (Exception ex)
{
throw ex; // ❌ Resets stack trace
}
// After (one-click fix)
catch (Exception ex)
{
throw; // ✅ Preserves stack trace
}
// Before
async void ProcessData() // ❌ May crash app
{
await DoWorkAsync();
}
// After (one-click fix)
async Task ProcessData() // ✅ Exceptions can be observed
{
await DoWorkAsync();
}
// Before
foreach (var item in items)
{
if (item < 0)
throw new ArgumentException(); // ❌ Performance issue
}
// After (one-click fix)
if (items.Any(i => i < 0))
throw new ArgumentException(); // ✅ Validate before loop
foreach (var item in items)
{
Process(item);
}
| ID | Category | Description |
|---|---|---|
| THROWS001-003 | Basic | Method throws, unhandled throws, try-catch blocks |
| THROWS004 | Patterns | Rethrow anti-pattern detection |
| THROWS007-010 | Catch Clauses | Ordering, empty, rethrow-only, overly broad |
| THROWS017-019 | Flow Analysis | Unhandled calls, deep propagation, undocumented |
| THROWS020-022 | Async | Sync throw, async void, unobserved tasks |
| THROWS023-024 | Iterators | Deferred exceptions, try-finally timing |
| THROWS025-026 | Lambdas | Uncaught exceptions, event handlers |
| THROWS027-030 | Best Practices | Control flow, naming, hot path, Result |
Configure via .editorconfig:
# Set severity levels
dotnet_diagnostic.THROWS001.severity = suggestion
dotnet_diagnostic.THROWS004.severity = warning
dotnet_diagnostic.THROWS021.severity = error
# Disable specific rules
dotnet_diagnostic.THROWS030.severity = none
dotnet buildFull documentation available at:
Contributions welcome! Please see CONTRIBUTING.md for guidelines.
MIT License - see LICENSE file for details.
ThrowsAnalyzer - Write safer C# code with comprehensive exception analysis.
FAQs
Unknown package
We found that throwsanalyzer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.