MCPcopy
hub / github.com/opencontainers/runc / Error

Method Error

libcontainer/mount_linux.go:108–132  ·  view source on GitHub ↗

Error provides a string error representation.

()

Source from the content-addressed store, hash-verified

106
107// Error provides a string error representation.
108func (e *mountError) Error() string {
109 out := e.op + " "
110
111 if e.source != "" {
112 out += "src=" + e.source + ", "
113 if e.srcFile != nil && e.srcFile.file != nil {
114 out += "srcType=" + string(e.srcFile.Type) + ", "
115 out += "srcFd=" + strconv.Itoa(int(e.srcFile.file.Fd())) + ", "
116 }
117 }
118 out += "dst=" + e.target
119 if e.dstFd != "" {
120 out += ", dstFd=" + e.dstFd
121 }
122
123 if e.flags != uintptr(0) {
124 out += ", flags=" + stringifyMountFlags(e.flags)
125 }
126 if e.data != "" {
127 out += ", data=" + e.data
128 }
129
130 out += ": " + e.err.Error()
131 return out
132}
133
134// Unwrap returns the underlying error.
135// This is a convention used by Go 1.13+ standard library.

Callers

nothing calls this directly

Calls 1

stringifyMountFlagsFunction · 0.85

Tested by

no test coverage detected