ExceptionManager 1.0.2

ExceptionManager allows to handle .NET Exceptions and their Messages in a easier way.

Install-Package ExceptionManager -Version 1.0.2
dotnet add package ExceptionManager --version 1.0.2
<PackageReference Include="ExceptionManager" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ExceptionManager --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

ExceptionManager

Exception Manager allows to get all the Inner Exceptions Messages from an Exception. You can return a new Exception or just all messages combined in one string.

Installation

  1. Open the Nuget Package Manager Console
  2. Install-Package ExceptionManager
  3. Or from the Nuget Package Manager search for ExceptionManager and install it from there

Usage

Example #1:

var innerException = new Exception("There was another error");
var exception = new Exception("There was an error", innerException);

var newException = ExceptionManager.ExceptionToException(exception);
Console.WriteLine(newException.Message);

// Outputs
// "There was an error, There was another error"

Example #2:

var innerException = new Exception("There was another error");
var exception = new Exception("There was an error", innerException);

var newExceptionMessage = ExceptionManager.ExceptionToString(exception);
Console.WriteLine(newExceptionMessage);

// Outputs
// "There was an error, There was another error"

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am &#39;Add some feature&#39;
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT License

ExceptionManager

Exception Manager allows to get all the Inner Exceptions Messages from an Exception. You can return a new Exception or just all messages combined in one string.

Installation

  1. Open the Nuget Package Manager Console
  2. Install-Package ExceptionManager
  3. Or from the Nuget Package Manager search for ExceptionManager and install it from there

Usage

Example #1:

var innerException = new Exception("There was another error");
var exception = new Exception("There was an error", innerException);

var newException = ExceptionManager.ExceptionToException(exception);
Console.WriteLine(newException.Message);

// Outputs
// "There was an error, There was another error"

Example #2:

var innerException = new Exception("There was another error");
var exception = new Exception("There was an error", innerException);

var newExceptionMessage = ExceptionManager.ExceptionToString(exception);
Console.WriteLine(newExceptionMessage);

// Outputs
// "There was an error, There was another error"

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am &#39;Add some feature&#39;
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT License

Release Notes

Breaking changes: Class name changed from ExceptionManager to ExceptionMgr

Dependencies

This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.2 368 10/7/2017
1.0.1 302 8/4/2017
1.0.0 429 7/29/2017