Xeption 2.3.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Xeption --version 2.3.0                
NuGet\Install-Package Xeption -Version 2.3.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Xeption" Version="2.3.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Xeption --version 2.3.0                
#r "nuget: Xeption, 2.3.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Xeption as a Cake Addin
#addin nuget:?package=Xeption&version=2.3.0

// Install Xeption as a Cake Tool
#tool nuget:?package=Xeption&version=2.3.0                

<p align="center"> <img width="25%" height="25%" src="https://raw.githubusercontent.com/hassanhabib/Xeption/master/Xeption/Resources/Xeption.png"> </p>

.NET The Standard - COMPLIANT

Xeption

A Better Exception for .NET

This simple library is engineered to expose a new API for the standard .NET Exception model to allow upserting a list of values against a key in the Data property of that very exception.

The Purpose

The purpose of this library is to allow .NET engineers to easily collect errors for any given flow or attribute before throwing the exception.

This new API simplifies the process of appending and being able to access the Data aspect of any exception to collect errors at any point in time.

The key value implementation for the Data attribute should make it simpler for engineers to represent errors around the same issue, attribute or value such as validation errors easily without any additional work-around code.

How to Use

To use Xeption; all you need to do is to inherit the Xeption model to your local Exception models as follows:

Setup

public class MyLocalException: Xeption
{
	// ...
}

Adding Values

To add values to your Xeption inheriting class, you will need to call .UpsertDataList(key, value) API to add more values to the dictionary as follows:

var myLocalException = new MyLocalException();
myLocalException.UpsertDataList(key: "MyKey", value: "MyValue");

Throwing If Contains Errors

Xeption also provides the ability to throw the local exception iff the data dictionary contains values in it. You can simply call that API from your local instance as follows:

myLocalException.ThrowIfContainsErrors();

Native APIs

Xeption will maintain the native APIs for the Exception native class.

var xeption = new Xeption();

var xeptionWithMessage = new Xeption(message: "Some Message");

var xeptionWithInnerException = new Xeption(
	message: "Some Message",
	innerException: someInnerException);

If you have any suggestions, comments or questions, please feel free to contact me on: <br /> Twitter: @hassanrezkhabib <br /> LinkedIn: hassanrezkhabib <br /> E-Mail: hassanhabib@live.com <br />

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (22)

Showing the top 5 NuGet packages that depend on Xeption:

Package Downloads
RESTFulSense

RESTFul Integration w/ Love <3

ADotNet

ADotNet is a dot net library to help engineers develop their build and release pipelines in C# without having to use YAML or any other technology.

RESTFulSense.WebAssembly

RESTFul Integration w/ Love <3

NEL.MESH

.NET Client To Send And Recieve MESH messages

Standardly.Core

A Template Engine For Generating Standard Compliant Code

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on Xeption:

Repository Stars
hassanhabib/OtripleS
This is an open source schooling system, dedicated to provide a better experience for schools needing a management and communication and tutoring system all in one place. This project is aiming toward directing all the software development funds and hours to families in need, the idea of the project is to allow schools to use the system as long as the software funds in the school are directed towards financially disadvantaged families and students.
hassanhabib/RESTFulSense
A RESTFul operations client that serializes responses and throws meaningful exceptions for >= 400 status codes.
OData/OData.Neo
Version Downloads Last updated
2.8.0 9,224 7/25/2024
2.6.0 37,393 10/11/2023
2.5.0 198,676 10/26/2022
2.4.0 28,747 6/15/2022
2.3.0 912 6/6/2022
2.2.0 4,941 3/8/2022
2.1.0 436 3/8/2022
2.0.0 410 3/7/2022
1.7.0 26,602 11/12/2021
1.6.0 22,404 9/9/2021
1.5.0 377 9/8/2021
1.4.0 371 9/8/2021
1.3.0 3,114 9/6/2021
1.2.0 349 9/5/2021
1.1.0 361 9/5/2021
1.0.0 411 9/5/2021

Initial Release