MCPcopy Index your code
hub / github.com/nodejs/node / handleErrorFromBinding

Function handleErrorFromBinding

lib/internal/fs/utils.js:352–365  ·  view source on GitHub ↗

* @param {InternalFSBinding.FSSyncContext} ctx

(ctx)

Source from the content-addressed store, hash-verified

350 * @param {InternalFSBinding.FSSyncContext} ctx
351 */
352function 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
367function preprocessSymlinkDestination(path, type, linkPath) {
368 if (!isWindows) {

Callers 1

writeSyncFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…