2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2026-06-13 14:38:43 +00:00
This commit is contained in:
2026-05-25 23:46:29 +03:00
parent 959bc76721
commit ae6a1fc8d7
8 changed files with 123 additions and 20 deletions
+3 -1
View File
@@ -32,6 +32,7 @@ public class AsyncException : Exception
{
public readonly ErrorType Type;
public readonly ExceptionCode Code;
//public readonly string Message;
public AsyncException(Exception exception) : base(exception.Message, exception)
{
@@ -42,7 +43,8 @@ public class AsyncException : Exception
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)
//: base(type == ErrorType.Management ? ((ExceptionCode)code).ToString() : message)
: base(message)
{
this.Type = type;
this.Code = (ExceptionCode)code;