Error provides a string error representation.
()
| 106 | |
| 107 | // Error provides a string error representation. |
| 108 | func (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. |
nothing calls this directly
no test coverage detected