Skip to content

A method that recursively dumps all exception stack traces and properties into a string

License

Notifications You must be signed in to change notification settings

alexeykuptsov/easy-exceptions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EasyExceptions

Provides a method that recursively dumps all exception stack traces and properties into a string.

Quick Start

Run the following command in the NuGet Package Manager Console:

Install-Package EasyExceptions

Use method ExceptionDumpUtil.Dump:

try
{
    throw new Exception();
}
catch (Exception ex)
{
    Console.WriteLine(ExceptionDumpUtil.Dump(ex));
}

Build

$env:ASSEMBLY_KEY_PATH=$AssemblySigningKeyPath + '\key.snk'
$env:SEMANTIC_VERSION=(Get-Content .\version.txt)
$env:BUILD_COUNTER='1234'
python prebuild.py
dotnet restore src/EasyExceptions.sln
dotnet build src/EasyExceptions.sln -p:Configuration=Release -p:DefineConstants=STRONG_NAME -p:Version=$env:SEMANTIC_VERSION -p:BuildCounter=$env:BUILD_COUNTER

Deploy

Release deploy is made via NuGet.org web GUI.

Test deploy (more info at https://docs.microsoft.com/ru-ru/azure/devops/artifacts/get-started-nuget):

nuget.exe push -Source "alexeykuptsov" -ApiKey az bin/EasyExceptions.$VERSION.nupkg

Test

1. Run unit tests in EasyExceptions.Tests.dll

2. This test is parametrized by one of the following .NET versions (these
are actual according to Google Trends):

  • .NET 5,
  • .NET Core 3.1,
  • .NET Framework 4.8,
  • .NET Framework 4.7.2.

2.1 Create a console app project with the selected .NET version. Remember its dependencies.

2.2 Copy file testData/nuget.config to repository root. It configures NuGet to work with test NuGet repository managed in Azure DevOps at https://dev.azure.com/alexeykuptsov/easy-exceptions/_packaging.

2.3 Install NuGet package EasyExceptions.

2.4 Expected result: Only EasyExceptions.dll is added.

About

A method that recursively dumps all exception stack traces and properties into a string

Resources

License

Stars

Watchers

Forks

Packages

No packages published