<PackageReference Include="NUnit" Version="4.3.1" />

ExceptionHelper

public static class ExceptionHelper
public static string BuildMessage(Exception exception, bool excludeExceptionNames = false)

public static string BuildStackTrace(Exception exception)

Builds up a message, using the Message field of the specified exception as well as any InnerExceptions.

public static void Rethrow(Exception exception)

Rethrows an exception, preserving its stack trace

public static Exception Unwrap(this Exception exception)

Unwraps the exception of type TargetInvocationException to its InnerException.