"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "vendor/github.com/Microsoft/hcsshim/internal/hcs/errors.go" between
moby-20.10.6.tar.gz and moby-20.10.7.tar.gz

About: Moby is a framework to assemble specialized container systems (formerly project name Docker; see here to clarify the relationship between the projects).

errors.go  (moby-20.10.6):errors.go  (moby-20.10.7)
skipping to change at line 174 skipping to change at line 174
Events []ErrorEvent Events []ErrorEvent
} }
var _ net.Error = &ProcessError{} var _ net.Error = &ProcessError{}
// SystemError is an error encountered in HCS during an operation on a Container object // SystemError is an error encountered in HCS during an operation on a Container object
type SystemError struct { type SystemError struct {
ID string ID string
Op string Op string
Err error Err error
Extra string
Events []ErrorEvent Events []ErrorEvent
} }
var _ net.Error = &SystemError{} var _ net.Error = &SystemError{}
func (e *SystemError) Error() string { func (e *SystemError) Error() string {
s := e.Op + " " + e.ID + ": " + e.Err.Error() s := e.Op + " " + e.ID + ": " + e.Err.Error()
for _, ev := range e.Events { for _, ev := range e.Events {
s += "\n" + ev.String() s += "\n" + ev.String()
} }
if e.Extra != "" {
s += "\n(extra info: " + e.Extra + ")"
}
return s return s
} }
func (e *SystemError) Temporary() bool { func (e *SystemError) Temporary() bool {
err, ok := e.Err.(net.Error) err, ok := e.Err.(net.Error)
return ok && err.Temporary() return ok && err.Temporary()
} }
func (e *SystemError) Timeout() bool { func (e *SystemError) Timeout() bool {
err, ok := e.Err.(net.Error) err, ok := e.Err.(net.Error)
return ok && err.Timeout() return ok && err.Timeout()
} }
func makeSystemError(system *System, op string, extra string, err error, events []ErrorEvent) error { func makeSystemError(system *System, op string, err error, events []ErrorEvent) error {
// Don't double wrap errors // Don't double wrap errors
if _, ok := err.(*SystemError); ok { if _, ok := err.(*SystemError); ok {
return err return err
} }
return &SystemError{ return &SystemError{
ID: system.ID(), ID: system.ID(),
Op: op, Op: op,
Extra: extra,
Err: err, Err: err,
Events: events, Events: events,
} }
} }
func (e *ProcessError) Error() string { func (e *ProcessError) Error() string {
s := fmt.Sprintf("%s %s:%d: %s", e.Op, e.SystemID, e.Pid, e.Err.Error()) s := fmt.Sprintf("%s %s:%d: %s", e.Op, e.SystemID, e.Pid, e.Err.Error())
for _, ev := range e.Events { for _, ev := range e.Events {
s += "\n" + ev.String() s += "\n" + ev.String()
} }
 End of changes. 4 change blocks. 
6 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)