Merge pull request #300 from Random-Liu/improve-some-error-message
Better format several errors
This commit is contained in:
@@ -155,5 +155,5 @@ func (RealOS) DeviceUUID(device string) (string, error) {
|
||||
return file.Name(), nil
|
||||
}
|
||||
}
|
||||
return "", fmt.Errorf("device not found")
|
||||
return "", fmt.Errorf("device %q not found", device)
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ func NewCRIContainerdService(config options.Config) (CRIContainerdService, error
|
||||
imageFSPath := imageFSPath(config.ContainerdConfig.RootDir, config.ContainerdConfig.Snapshotter)
|
||||
c.imageFSUUID, err = c.getDeviceUUID(imageFSPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get imagefs uuid: %v", err)
|
||||
return nil, fmt.Errorf("failed to get imagefs uuid of %q: %v", imageFSPath, err)
|
||||
}
|
||||
|
||||
c.netPlugin, err = ocicni.InitCNI(config.NetworkPluginConfDir, config.NetworkPluginBinDir)
|
||||
|
||||
Reference in New Issue
Block a user