Skip to content

Latest commit

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

NHelpfulException

A simple wrapper for System.Exception to help make exceptions more meaningful.

Usage:

1. Create your HelpfulException

publicclassMyHelpfulException:HelpfulException{publicMyHelpfulException(stringproblemDescription,string[]resolutionSuggestions=default(string[]),ExceptioninnerException=default(Exception)):base(problemDescription,resolutionSuggestions,innerException){}}

2. Instantiate and throw the exception

thrownewMyHelpfulException("Coffee supply too low.",new[]{"Buy some more coffee.","Stop drinking so much coffee."});

3. Bask in the glory of a meaningful exception message

 Coffee supply too low.
Suggestions:
- Buy some more coffee.
- Stop drinking so much coffee.

License & Copyright

This software is released under the GNU Lesser GPL. It is Copyright 2011, Ben Aston. I may be contacted at ben@bj.ma.

About

A simple wrapper for System.Exception to help make exceptions more meaningful. Available on NuGet.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages