MCPcopy Create free account
hub / github.com/appium/appium / wrapErrorForVm

Function wrapErrorForVm

packages/execute-driver-plugin/lib/vm-host-binding.ts:126–135  ·  view source on GitHub ↗
(err: unknown)

Source from the content-addressed store, hash-verified

124}
125
126function wrapErrorForVm(err: unknown): unknown {
127 if (isOurProxy(err) || isVmRealmValue(err)) {
128 return err;
129 }
130 try {
131 return wrapIfNeeded(err);
132 } catch {
133 return FALLBACK_WRAPPED_ERROR;
134 }
135}
136
137function copyFunctionMetadata(vmFn: HostCallable, wrapped: HostCallable, includePrototype: boolean): void {
138 for (const key of ['length', 'name'] as const) {

Callers 2

runVmCallbackFunction · 0.85
runTrapSafelyFunction · 0.85

Calls 3

isOurProxyFunction · 0.85
isVmRealmValueFunction · 0.85
wrapIfNeededFunction · 0.85

Tested by

no test coverage detected