Esempio n. 1
0
 public AppException(string message, bool sendEmail, AppExceptionType exceptionType, ILookup <string, string> errors)
     : base(message)
 {
     SendEmail     = sendEmail;
     ExceptionType = exceptionType;
     Errors        = errors;
 }
Esempio n. 2
0
 public AppException(string message, bool sendEmail, AppExceptionType exceptionType, string methodName)
     : base(message)
 {
     MethodName    = methodName;
     SendEmail     = sendEmail;
     ExceptionType = exceptionType;
 }
Esempio n. 3
0
 public AppException(string message, bool sendEmail, AppExceptionType exceptionType, Exception innerException, ILookup <string, string> errors)
     : base(message, innerException.GetBaseException())
 {
     SendEmail     = sendEmail;
     ExceptionType = exceptionType;
     Errors        = errors;
 }
Esempio n. 4
0
 public AppException(string message, bool sendEmail, AppExceptionType exceptionType, Exception innerException, string methodName)
     : base(message, innerException.GetBaseException())
 {
     MethodName    = methodName;
     SendEmail     = sendEmail;
     ExceptionType = exceptionType;
 }
Esempio n. 5
0
 /// <summary>
 /// 此接口仅用于产生通用相应dto的文档说明
 /// </summary>
 /// <param name="resultDto"></param>
 /// <param name="appExceptionType"></param>
 /// <returns></returns>
 public ExceptionResultDto ApiResultDto(ResultDto <object> resultDto, AppExceptionType appExceptionType)
 {
     return(null);
 }
Esempio n. 6
0
 public AppException(string message, AppExceptionType statusCode, Exception originalException = null, string verboseLog = null) : base(message)
 {
     ExceptionType     = statusCode;
     OriginalException = originalException;
     VerboseLog        = verboseLog;
 }
Esempio n. 7
0
 public AppException(AppExceptionType exceptionType) : base(((int)exceptionType).GetDescription <AppExceptionType>())
 {
     ErrorCode = ((int)exceptionType).ToString();
 }
Esempio n. 8
0
 public AppException(string errorMessage, AppExceptionType exceptionType) : base(errorMessage)
 {
     ErrorCode = ((int)exceptionType).ToString();
 }
Esempio n. 9
0
 /// <summary>
 /// Create a custom app exception.
 /// </summary>
 /// <param name="exceptionType">App exception type</param>
 /// <param name="message">Error message</param>
 /// <param name="originalException"></param>
 /// <returns>Custom app exception</returns>
 private static AppException CreateException(AppExceptionType exceptionType, string message, Exception originalException = null, string verboseLog = null)
 {
     return(new AppException(message, exceptionType, originalException, verboseLog));
 }
Esempio n. 10
0
 public T ThrowException <T>(AppExceptionType exceptionType) where T : notnull
 {
     ExceptionInfo = new AppException(exceptionType);
     return(default(T));
 }
Esempio n. 11
0
 public T ThrowException <T>(string errorMessage, AppExceptionType exceptionType) where T : notnull
 {
     ExceptionInfo = new AppException(errorMessage, exceptionType);
     return(default(T));
 }
Esempio n. 12
0
 public AppException(string message, bool sendEmail, AppExceptionType exceptionType, Exception innerException)
     : base(message, innerException.GetBaseException())
 {
     SendEmail     = sendEmail;
     ExceptionType = exceptionType;
 }
Esempio n. 13
0
 public AppException(string message, bool sendEmail, AppExceptionType exceptionType)
     : base(message)
 {
     SendEmail     = sendEmail;
     ExceptionType = exceptionType;
 }