Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

19 Commits

Repository files navigation

Never write another custom exception class ever again.

EZXception

EZXception is a netstandard2.0 library that ships 50+ pre-built, richly structured exception types covering every scenario a .NET developer encounters - validation, authorization, data access, business rules, configuration, external services, file I/O, networking, serialization, concurrency, and domain modeling.

Instead of writing this every time:

publicclassUserNotFoundException:Exception{publicUserNotFoundException(stringid):base($"User '{id}' was not found."){}}

You just do this:

thrownewEntityNotFoundException("User",id);

Every exception carries typed contextual properties (entity name, field name, status code, timeout, etc.) so catch blocks can read structured data instead of parsing message strings.

Get Started

dotnet add package EZXception --version 1.0.0

Documentation

Naming Notes

Three exceptions carry an EZ prefix to avoid compile-time ambiguity with identically named BCL types:

EZXception typeWould shadow
EZXception.IO.EZFileNotFoundExceptionSystem.IO.FileNotFoundException
EZXception.IO.EZDirectoryNotFoundExceptionSystem.IO.DirectoryNotFoundException
EZXception.Serialization.EZSerializationExceptionSystem.Runtime.Serialization.SerializationException

License

MIT

About

Never write another custom exception ever again. 50+ pre-built, richly structured exception types covering every scenario a .NET developer encounters.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages