public BusinessExceptionDto(BusinessExceptionEnum type, string message, string error, string stackTrace) { ExceptionType = type; Message = message; StackTrace = stackTrace; Error = error; }
public ExceptionNotifierViewModel(string message, string stackTrace, BusinessExceptionEnum type) { View = new ExceptionNotifierView(); ExceptionMsg = message; ExceptionCallStack = stackTrace; ExceptionType = type; View.DataContext = this; ImageFilePath = GetImagePath(type); TitleMessage = GetTitleMessage(type); View.ShowDialog(); }
private static string GetImagePath(BusinessExceptionEnum type) { switch (type) { case BusinessExceptionEnum.Default: case BusinessExceptionEnum.Operational: return(@"\Resources\Images\Exception.png"); case BusinessExceptionEnum.Validation: return(@"\Resources\Images\Warning.png"); default: throw new ApplicationException("Invalid exception type was passed, image could not be found"); } }
private static string GetTitleMessage(BusinessExceptionEnum type) { switch (type) { case BusinessExceptionEnum.Default: case BusinessExceptionEnum.Operational: return("Exception Message"); case BusinessExceptionEnum.Validation: return("Warning/Validation Message"); default: throw new ApplicationException("Invalid exception type was passed, image could not be found"); } }
public BusinessException(BusinessExceptionEnum type, string message) : base(message) { ExceptionType = type; }
public BusinessException(BusinessExceptionEnum businessExceptionType, string message) : base(message) { ExceptionType = businessExceptionType; }
public BusinessExceptionDto(BusinessExceptionEnum type, string message, string stackTrace) { ExceptionType = type; Message = message; StackTrace = stackTrace; }