(err: unknown)
| 124 | } |
| 125 | |
| 126 | function 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 | |
| 137 | function copyFunctionMetadata(vmFn: HostCallable, wrapped: HostCallable, includePrototype: boolean): void { |
| 138 | for (const key of ['length', 'name'] as const) { |
no test coverage detected