123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using System;
- namespace Infrastructure
- {
- public class CustomException : Exception
- {
- public int Code { get; set; }
-
-
-
- public string Msg { get; set; }
-
-
-
- public string LogMsg { get; set; }
-
-
-
- public bool Notice { get; set; } = true;
- public CustomException(string msg) : base(msg)
- {
- }
- public CustomException(int code, string msg) : base(msg)
- {
- Code = code;
- Msg = msg;
- }
- public CustomException(ResultCode resultCode, string msg, bool notice = true) : base(msg)
- {
- Code = (int)resultCode;
- Notice = notice;
- }
-
-
-
-
-
-
- public CustomException(ResultCode resultCode, string msg, object errorMsg) : base(msg)
- {
- Code = (int)resultCode;
- LogMsg = errorMsg.ToString();
- }
- }
- }
|