* Fixes up error messages so they mention the mounted file location relative * to the MFS root, not to the particular FS's root. * Mutates the input error, and returns it.
(err: ApiError, path: string, realPath: string)
| 185 | * Mutates the input error, and returns it. |
| 186 | */ |
| 187 | public standardizeError(err: ApiError, path: string, realPath: string): ApiError { |
| 188 | const index = err.message.indexOf(path); |
| 189 | if (index !== -1) { |
| 190 | err.message = err.message.substr(0, index) + realPath + err.message.substr(index + path.length); |
| 191 | err.path = realPath; |
| 192 | } |
| 193 | return err; |
| 194 | } |
| 195 | |
| 196 | // The following methods involve multiple file systems, and thus have custom |
| 197 | // logic. |
no outgoing calls
no test coverage detected