diff --git a/src/vm.ts b/src/vm.ts index b2dec44..a5f5e76 100644 --- a/src/vm.ts +++ b/src/vm.ts @@ -591,7 +591,7 @@ export class VM { // no exception handlers, let it crash if (this.exceptionHandlers.length === 0) { - throw new Error(`Uncaught exception in native function: ${errorMessage}`) + throw new Error(errorMessage) } // use existing THROW logic diff --git a/tests/native.test.ts b/tests/native.test.ts index 410edf3..ed44e26 100644 --- a/tests/native.test.ts +++ b/tests/native.test.ts @@ -2359,5 +2359,5 @@ test('uncaught native function error crashes VM', async () => { throw new Error('uncaught error') }) - await expect(vm.run()).rejects.toThrow('Uncaught exception in native function: uncaught error') + await expect(vm.run()).rejects.toThrow('uncaught error') }) \ No newline at end of file