2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 13:33:13 +00:00

.Net 6 Upgrade

This commit is contained in:
2021-12-01 12:17:45 +03:00
parent 1166e93ba9
commit 530df018ec
164 changed files with 21247 additions and 21425 deletions

View File

@ -26,32 +26,31 @@ using System;
using System.Collections.Generic;
using System.Text;
namespace Esiur.Core
namespace Esiur.Core;
public class AsyncException : Exception
{
public class AsyncException : Exception
public readonly ErrorType Type;
public readonly ExceptionCode Code;
public AsyncException(Exception exception) : base(exception.Message, exception)
{
public readonly ErrorType Type;
public readonly ExceptionCode Code;
Type = ErrorType.Exception;
Code = 0;
}
public AsyncException(Exception exception) :base(exception.Message, exception)
{
Type = ErrorType.Exception;
Code = 0;
}
public override string StackTrace => InnerException != null && Type == ErrorType.Exception ? InnerException.StackTrace : base.StackTrace;
public override string StackTrace => InnerException != null && Type == ErrorType.Exception ? InnerException.StackTrace : base.StackTrace;
public AsyncException(ErrorType type, ushort code, string message)
: base(type == ErrorType.Management ? ((ExceptionCode)code).ToString() : message)
{
this.Type = type;
this.Code = (ExceptionCode)code;
public AsyncException(ErrorType type, ushort code, string message)
: base(type == ErrorType.Management ? ((ExceptionCode)code).ToString() : message)
{
this.Type = type;
this.Code = (ExceptionCode)code;
}
}
public override string ToString()
{
return Code.ToString() + ": " + Message;
}
public override string ToString()
{
return Code.ToString() + ": " + Message;
}
}