public ErrorCode(IErrorCode other, ArgumentPlaceholder <string> description = default, ArgumentPlaceholder <SeverityLevel?> severityLevel = default) : this( identifier : other.EnsureNotNull(nameof(other)).Value.Identifier, severityLevel : severityLevel.Substitute(value : other.SeverityLevel), description : description.Substitute(value : other.Description)) { }
public InteractionFaultCode(IErrorCode code) { code.EnsureNotNull(nameof(code)); // Identifier = code.Identifier; Description = code.Description; SeverityLevel = code.SeverityLevel; }
public ErrorLogMiddleware(RequestDelegate next, ILoggerFactory loggerFactory, IErrorCode errorCodeStore) { _next = next; _logger = loggerFactory.CreateLogger <ErrorLogMiddleware>(); _errorCodeStore = errorCodeStore; }
public OrderCloudIntegrationException(IErrorCode errorCode, object data) { ApiError = new ApiError { ErrorCode = errorCode.Code, Message = errorCode.DefaultMessage, Data = data }; }
public GrException( string?message = null, IErrorCode?errorCode = null, Exception?cause = null ) : base(message, cause) { ErrorCode = errorCode ?? CommonErrorCodes.UnknownError; }
public override IEnumerable <object> Run() { yield return(null); IErrorCode <TErrorCode> op = base.Operation; if (op == null) { Log <EnumProcessor <TOperation, TErrorCode> > .Logger.Error("EnumProcessor : 오퍼레이션이 IErrorCode가 아닙니다."); base.Result = false; } else if (!(base.Feedback is int)) { op.ErrorCode = this.DefaultValue; if (base.Feedback is OkMessage) { base.Result = true; } else if (base.Feedback is FailMessage) { base.Result = false; } else { base.Result = false; Log <EnumProcessor <TOperation, TErrorCode> > .Logger.Error("EnumProcessor : int 혹은 OkMessage, FailMessage만 받을 수 있습니다."); } } else { op.ErrorCode = (TErrorCode)((object)Enum.ToObject(typeof(TErrorCode), (int)base.Feedback)); base.Result = false; yield return(null); base.Result = (base.Feedback is OkMessage); } yield break; }
internal P_ExceptionData(P_ExceptionData source = default, ArgumentPlaceholder <IErrorCode> errorCode = default, ArgumentPlaceholder <bool> isObserved = default) { _errorCode = errorCode.HasExplicitValue ? errorCode.ExplicitValue : source?._errorCode; _isObserved = isObserved.HasExplicitValue ? isObserved.ExplicitValue : (source?._isObserved ?? false); }
public Error(IErrorCode errorCode, string errorMessage) { ErrorCode = errorCode; ErrorMessage = errorMessage; }
public DataSyncException(IErrorCode errorCode, string msg) : base(msg) { ErrorCode = errorCode; }