JLib.Exceptions 0.6.2

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package JLib.Exceptions --version 0.6.2
NuGet\Install-Package JLib.Exceptions -Version 0.6.2
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="JLib.Exceptions" Version="0.6.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JLib.Exceptions --version 0.6.2
#r "nuget: JLib.Exceptions, 0.6.2"
#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 JLib.Exceptions as a Cake Addin
#addin nuget:?package=JLib.Exceptions&version=0.6.2

// Install JLib.Exceptions as a Cake Tool
#tool nuget:?package=JLib.Exceptions&version=0.6.2

JLib.Exceptions

Provides a standardized way to create, aggregate and throw exceptions.

ExceptionBuilder Examples

Issues with the current implementation

  • The ExceptionBuilder does not have any way to remove children if they have no content - leading to unneccessary memory allocations
    • Solution: The ExceptionBuilder could derive from IDisposable. When disposed, it will freeze and, if empty, remove itself from the parent
  • The JLibException and JLibAggregateException sound similar but represent different UseCases:
    • Exception:
      • JLibException: An exception thrown by the JLib itself
      • JLibAggregateException: extended aggregate exception which can be used by everyone, optimized for better readabillity
    • Solutions:
      • Delete the JLibAggregateException and move the utility to an Extension Method
        • Drawback: the ToString has to be overridden manually to get the improved message
      • Rename JlibAggregateException to ExtendedAggregateException
        • Drawback: The name is long and not very descriptive
      • Discard the JLibException as base-class for all exceptions thrown by the JLib
        • Drawback: Exceptions from the JLib can no longer be easily distinguished from other exceptions
          • is this even a reasonable usecase?
  • the JLibAggregateException.Message does not behave like the default (containing only the message) but instead contains the whole tree
    • Solutions:
      • move the tree functionality to the ToString method
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on JLib.Exceptions:

Package Downloads
JLib.ValueTypes The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Package Description

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

Package Description

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

Package Description

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

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.6.2 399 4/10/2024
0.6.1 313 3/15/2024
0.6.0 299 3/15/2024
0.5.0 286 3/14/2024
0.4.5 320 3/13/2024
0.4.4 304 3/12/2024
0.4.3 366 3/12/2024
0.4.2 316 3/7/2024
0.4.1 295 3/7/2024
0.4.0 300 3/6/2024
0.3.0 309 2/29/2024
0.2.0 310 2/14/2024