Ejemplo n.º 1
0
 public PatchExecutionError(PatchExecutionErrorType errorType, ISnPatch[] faultyPatches, string message)
 {
     ErrorType     = errorType;
     FaultyPatches = faultyPatches;
     FaultyPatch   = faultyPatches?.FirstOrDefault();
     Message       = message;
 }
Ejemplo n.º 2
0
 public PatchExecutionError(PatchExecutionErrorType errorType, ISnPatch faultyPatch, string message)
 {
     ErrorType     = errorType;
     FaultyPatch   = faultyPatch;
     FaultyPatches = faultyPatch == null ? new ISnPatch[0] : new[] { faultyPatch };
     Message       = message;
 }
Ejemplo n.º 3
0
 private void Error(ISnPatch patch, PatchExecutionErrorType errorType, string message)
 {
     _context.Errors.Add(new PatchExecutionError(errorType, patch, message));
 }
Ejemplo n.º 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}");
        }
Ejemplo n.º 5
0
 public PatchExecutionException(PatchExecutionErrorType errorType, ISnPatch patch, string message, Exception inner)
     : base(GetDefaultMessage(errorType, patch, message), inner)
 {
     ErrorType = errorType;
     Patch     = patch;
 }
Ejemplo n.º 6
0
 public PatchExecutionException(PatchExecutionErrorType errorType, ISnPatch patch)
     : base(GetDefaultMessage(errorType, patch, null))
 {
     ErrorType = errorType;
     Patch     = patch;
 }