示例#1
0
 public PatchExecutionError(PatchExecutionErrorType errorType, ISnPatch[] faultyPatches, string message)
 {
     ErrorType     = errorType;
     FaultyPatches = faultyPatches;
     FaultyPatch   = faultyPatches?.FirstOrDefault();
     Message       = message;
 }
示例#2
0
 public PatchExecutionError(PatchExecutionErrorType errorType, ISnPatch faultyPatch, string message)
 {
     ErrorType     = errorType;
     FaultyPatch   = faultyPatch;
     FaultyPatches = faultyPatch == null ? new ISnPatch[0] : new[] { faultyPatch };
     Message       = message;
 }
示例#3
0
 private void Error(ISnPatch patch, PatchExecutionErrorType errorType, string message)
 {
     _context.Errors.Add(new PatchExecutionError(errorType, patch, message));
 }
示例#4
0
        private static string GetDefaultMessage(PatchExecutionErrorType errorType, ISnPatch patch, string message)
        {
            var msg = message ?? "An error occured during a patch execution.";

            return($"{msg} Patch: {patch}, error type: {errorType}");
        }
示例#5
0
 public PatchExecutionException(PatchExecutionErrorType errorType, ISnPatch patch, string message, Exception inner)
     : base(GetDefaultMessage(errorType, patch, message), inner)
 {
     ErrorType = errorType;
     Patch     = patch;
 }
示例#6
0
 public PatchExecutionException(PatchExecutionErrorType errorType, ISnPatch patch)
     : base(GetDefaultMessage(errorType, patch, null))
 {
     ErrorType = errorType;
     Patch     = patch;
 }