* @param {InternalFSBinding.FSSyncContext} ctx
(ctx)
| 350 | * @param {InternalFSBinding.FSSyncContext} ctx |
| 351 | */ |
| 352 | function handleErrorFromBinding(ctx) { |
| 353 | if (ctx.errno !== undefined) { // libuv error numbers |
| 354 | const err = new UVException(ctx); |
| 355 | ErrorCaptureStackTrace(err, handleErrorFromBinding); |
| 356 | throw err; |
| 357 | } |
| 358 | if (ctx.error !== undefined) { // Errors created in C++ land. |
| 359 | // TODO(joyeecheung): currently, ctx.error are encoding errors |
| 360 | // usually caused by memory problems. We need to figure out proper error |
| 361 | // code(s) for this. |
| 362 | ErrorCaptureStackTrace(ctx.error, handleErrorFromBinding); |
| 363 | throw ctx.error; |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | function preprocessSymlinkDestination(path, type, linkPath) { |
| 368 | if (!isWindows) { |
no outgoing calls
no test coverage detected
searching dependent graphs…