MCPcopy
hub / github.com/rclone/rclone / processError

Method processError

fs/sync/sync.go:319–349  ·  view source on GitHub ↗

This checks the types of errors returned while copying files

(err error)

Source from the content-addressed store, hash-verified

317
318// This checks the types of errors returned while copying files
319func (s *syncCopyMove) processError(err error) {
320 if err == nil {
321 return
322 }
323 if err == context.DeadlineExceeded {
324 err = fserrors.NoRetryError(err)
325 } else if err == accounting.ErrorMaxTransferLimitReachedGraceful {
326 if s.inCtx.Err() == nil {
327 fs.Logf(nil, "%v - stopping transfers", err)
328 // Cancel the march and stop the pipes
329 s.inCancel()
330 }
331 } else if err == context.Canceled && s.inCtx.Err() != nil {
332 // Ignore context Canceled if we have called s.inCancel()
333 return
334 }
335 s.errorMu.Lock()
336 defer s.errorMu.Unlock()
337 switch {
338 case fserrors.IsFatalError(err):
339 if !s.aborting() {
340 fs.Errorf(nil, "Cancelling sync due to fatal error: %v", err)
341 s.cancel()
342 }
343 s.fatalErr = err
344 case fserrors.IsNoRetryError(err):
345 s.noRetryErr = err
346 default:
347 s.err = err
348 }
349}
350
351// Returns the current error (if any) in the order of precedence
352//

Callers 7

pairCheckerMethod · 0.95
pairCopyOrMoveMethod · 0.95
startDeletersMethod · 0.95
runMethod · 0.95
copyDirMetadataMethod · 0.95
SrcOnlyMethod · 0.95
MatchMethod · 0.95

Calls 9

abortingMethod · 0.95
NoRetryErrorFunction · 0.92
LogfFunction · 0.92
IsFatalErrorFunction · 0.92
ErrorfFunction · 0.92
IsNoRetryErrorFunction · 0.92
LockMethod · 0.65
UnlockMethod · 0.65
ErrMethod · 0.45

Tested by

no test coverage detected