extended recover tests
All checks were successful
.NET Test / test (push) Successful in 4m42s
.NET Publish / publish (push) Successful in 5m53s

This commit is contained in:
2023-12-18 20:55:48 +04:00
parent 3d34a3021d
commit 719b4e85f5
2 changed files with 19 additions and 4 deletions

View File

@@ -178,14 +178,17 @@ public sealed class ExceptionalError : Error
{
internal readonly Exception? Exception;
[Pure, MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static string ToErrorType(Type exceptionType) => exceptionType.FullName ?? exceptionType.Name;
internal ExceptionalError(Exception exception)
: this(exception.GetType().FullName ?? exception.GetType().Name, exception.Message)
: this(ToErrorType(exception.GetType()), exception.Message)
{
Exception = exception;
ExtensionData = ExtractExtensionData(exception);
}
internal ExceptionalError(string message, Exception exception)
: this(exception.GetType().FullName ?? exception.GetType().Name, message)
: this(ToErrorType(exception.GetType()), message)
{
Exception = exception;
ExtensionData = ExtractExtensionData(exception);