# amantinband/throw

A simple, fluent, extensible, and fully customizable library for throwing exceptions for projects using .NET 6+

Repository: https://github.com/amantinband/throw
Canonical: https://ross.abutalabs.com/products/throw
Language: C#
License: MIT
License Family: permissive
Topics: argument, guard, clause, exception, contract, assert, assertion, validation, fluent
Last push: 2024-08-21T11:15:18+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 1647, "days_push": 742, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1290, forks 85 (observed 2026-08-28T04:04:15.531743+00:00)

## What it is
A fluent, extensible .NET 6+ library for throwing exceptions with customizable guard clauses and argument validation. It provides chainable checks for strings, collections, comparables, enums, and more.

## Use cases
- validate method arguments with guard clauses in C#
- throw custom exceptions with a fluent API
- check strings and collections for null or empty before use
- enforce contract-style assertions in .NET code
- customize exception messages and exception types per check

## When to choose
- you want readable, chainable argument validation in .NET 6+
- you need fully customizable exception types and messages
- you prefer a lightweight library over a full validation framework

## When to avoid
- you need data annotation or model-level validation rather than guard clauses
- your project targets .NET versions below 6
- you want validation results collected instead of exceptions thrown

## Facets
- artifact type: library
- maturity: stable
- function: error-handling, testing
- domain: developer-tools, programming-languages
- platform: dotnet, cross-platform
- tags: guard-clauses, exceptions, fluent-api, argument-validation, assertions, csharp

## Member repositories
- amantinband/throw (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:15.531743+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:54:50.962941+00:00, confidence not recorded.
  - readme: https://github.com/amantinband/throw (fetched 2026-08-28T04:04:15.531743+00:00, sha b820f9041e0f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
