23 lines
661 B
C#
23 lines
661 B
C#
using System;
|
|
|
|
namespace gswi.Model.Filters
|
|
{
|
|
public class ServiceException: Exception {
|
|
public ServiceErrorCode ErrorCode { get; set; }
|
|
public string ErrorMessage { get; set; }
|
|
public string Nameof { get; set; }
|
|
|
|
|
|
public ServiceException(ServiceErrorCode errorCode, string errorMessage) {
|
|
ErrorCode = errorCode;
|
|
ErrorMessage = errorMessage;
|
|
}
|
|
|
|
public string GetMessage() {
|
|
return ErrorMessage;
|
|
}
|
|
public string GetDetailedMessage() {
|
|
return $"{nameof(ServiceException)} - ErrorCode: {ErrorCode} - ErrorMessage: {ErrorMessage}";
|
|
}
|
|
}
|
|
} |