Xeption 2.6.0

dotnet add package Xeption --version 2.6.0
NuGet\Install-Package Xeption -Version 2.6.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.6.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Xeption --version 2.6.0
#r "nuget: Xeption, 2.6.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.6.0

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


.NET Nuget The Standard - COMPLIANT The Standard The Standard Community


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.


The most important fulfillment aspect in a Standard complaint system is aimed towards contributing to people, its evolution, and principles. An organization that systematically honors an environment of learning, training, and sharing knowledge is an organization that learns from the past, makes calculated risks for the future, and brings everyone within it up to speed on the current state of things as honestly, rapidly, and efficiently as possible.

We believe that everyone has the right to privacy, and will never do anything that could violate that right. We are committed to writing ethical and responsible software, and will always strive to use our skills, coding, and systems for the good. We believe that these beliefs will help to ensure that our software(s) are safe and secure and that it will never be used to harm or collect personal data for malicious purposes.

The Standard Community as a promise to you is in upholding these values.

How to Use

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


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:


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:




Important Notice

Special thanks to all the contributors, and a very special thanks to Mr. Hassan Habib and Mr. Christo du Toit for their

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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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 (15)

Showing the top 5 NuGet packages that depend on Xeption:

Package Downloads

RESTFul Integration w/ Love <3


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.


.NET Client To Send And Recieve MESH messages


RESTFul Integration w/ Love <3

Standardly.Core The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

A Template Engine For Generating Standard Compliant Code

GitHub repositories (3)

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

Repository Stars
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.
A RESTFul operations client that serializes responses and throws meaningful exceptions for >= 400 status codes.
Version Downloads Last updated
2.6.0 26,143 10/11/2023
2.5.0 136,468 10/26/2022
2.4.0 28,183 6/15/2022
2.3.0 883 6/6/2022
2.2.0 4,771 3/8/2022
2.1.0 406 3/8/2022
2.0.0 382 3/7/2022
1.7.0 26,125 11/12/2021
1.6.0 21,562 9/9/2021
1.5.0 349 9/8/2021
1.4.0 345 9/8/2021
1.3.0 3,039 9/6/2021
1.2.0 326 9/5/2021
1.1.0 334 9/5/2021
1.0.0 351 9/5/2021

Addition of a SameExceptionAs expression that can be used in unit tests