Levge.Exceptions
1.1.41
See the version list below for details.
dotnet add package Levge.Exceptions --version 1.1.41
NuGet\Install-Package Levge.Exceptions -Version 1.1.41
<PackageReference Include="Levge.Exceptions" Version="1.1.41" />
<PackageVersion Include="Levge.Exceptions" Version="1.1.41" />
<PackageReference Include="Levge.Exceptions" />
paket add Levge.Exceptions --version 1.1.41
#r "nuget: Levge.Exceptions, 1.1.41"
#:package Levge.Exceptions@1.1.41
#addin nuget:?package=Levge.Exceptions&version=1.1.41
#tool nuget:?package=Levge.Exceptions&version=1.1.41
<img src="icon.png" width="100" height="100" alt="Levge.Exceptions logo" />
Levge.Exceptions
Levge.Exceptions is a lightweight library providing custom exception types for consistent error handling across all Levge packages.
Features
- ? Standardized exceptions � unified error handling across applications
- ? Specialized exception types � different exceptions for different error scenarios
- ? Simple and expressive API � easily create meaningful error messages
Installation
.NET CLI
dotnet add package Levge.Exceptions
Package Manager
Install-Package Levge.Exceptions
Setup
No specific setup is required. Simply reference the package and start using the exception types in your code.
Usage
// Basic usage with message throw new LevgeException("Something went wrong");
// Not found exception with resource information throw new LevgeNotFoundException("User", 123);
// Conflict exception for a specific field throw LevgeConflictException.ForField("Email", "user@example.com");
// Validation exception with multiple errors var errors = new Dictionary<string, string[]> { { "Username", new[] { "Username is required" } }, { "Email", new[] { "Invalid email format", "Email domain not allowed" } } }; throw new LevgeValidationException(errors);
// Unauthorized exception throw new LevgeUnauthorizedException();
Available Exception Types
| Exception Type | Description |
|---|---|
LevgeException |
Base exception for all Levge-specific exceptions |
LevgeNotFoundException |
Thrown when a requested resource cannot be found |
LevgeConflictException |
Thrown when a resource conflict occurs (e.g., duplicate entry) |
LevgeUnauthorizedException |
Thrown when a user lacks permission for an action |
LevgeValidationException |
Thrown when input validation fails with detailed error information |
License
MIT License. See LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Levge.Exceptions:
| Package | Downloads |
|---|---|
|
Levge.Domain
Domain entity, interface, enumeration, domain events, and Result pattern base types for Levge projects. |
|
|
Levge.ConsistentResponse
A library for standardizing API responses in ASP.NET Core applications with consistent formatting, error handling, and exception middleware. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.3.0 | 195 | 4/29/2026 |
| 2.2.0 | 94 | 4/29/2026 |
| 2.1.0 | 165 | 4/27/2026 |
| 2.0.1 | 178 | 4/27/2026 |
| 2.0.0 | 118 | 4/26/2026 |
| 1.1.45 | 221 | 1/22/2026 |
| 1.1.43 | 624 | 6/24/2025 |
| 1.1.42 | 236 | 6/24/2025 |
| 1.1.41 | 407 | 6/22/2025 |
| 1.1.31 | 172 | 6/21/2025 |
| 1.1.1 | 183 | 6/21/2025 |
| 1.1.0 | 681 | 6/17/2025 |
| 1.0.1 | 298 | 6/17/2025 |
| 1.0.0 | 419 | 6/16/2025 |