Ejemplo n.º 1
0
 public AppException(string message, bool sendEmail, AppExceptionType exceptionType, ILookup <string, string> errors)
     : base(message)
 {
     SendEmail     = sendEmail;
     ExceptionType = exceptionType;
     Errors        = errors;
 }
Ejemplo n.º 2
0
 public AppException(string message, bool sendEmail, AppExceptionType exceptionType, string methodName)
     : base(message)
 {
     MethodName    = methodName;
     SendEmail     = sendEmail;
     ExceptionType = exceptionType;
 }
Ejemplo 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;
 }
Ejemplo 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;
 }
Ejemplo 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);
 }
Ejemplo n.º 6
0
 public AppException(string message, AppExceptionType statusCode, Exception originalException = null, string verboseLog = null) : base(message)
 {
     ExceptionType     = statusCode;
     OriginalException = originalException;
     VerboseLog        = verboseLog;
 }
Ejemplo n.º 7
0
 public AppException(AppExceptionType exceptionType) : base(((int)exceptionType).GetDescription <AppExceptionType>())
 {
     ErrorCode = ((int)exceptionType).ToString();
 }
Ejemplo n.º 8
0
 public AppException(string errorMessage, AppExceptionType exceptionType) : base(errorMessage)
 {
     ErrorCode = ((int)exceptionType).ToString();
 }
Ejemplo 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));
 }
Ejemplo n.º 10
0
 public T ThrowException <T>(AppExceptionType exceptionType) where T : notnull
 {
     ExceptionInfo = new AppException(exceptionType);
     return(default(T));
 }
Ejemplo n.º 11
0
 public T ThrowException <T>(string errorMessage, AppExceptionType exceptionType) where T : notnull
 {
     ExceptionInfo = new AppException(errorMessage, exceptionType);
     return(default(T));
 }
Ejemplo n.º 12
0
 public AppException(string message, bool sendEmail, AppExceptionType exceptionType, Exception innerException)
     : base(message, innerException.GetBaseException())
 {
     SendEmail     = sendEmail;
     ExceptionType = exceptionType;
 }
Ejemplo n.º 13
0
 public AppException(string message, bool sendEmail, AppExceptionType exceptionType)
     : base(message)
 {
     SendEmail     = sendEmail;
     ExceptionType = exceptionType;
 }