Giter Club home page Giter Club logo

Comments (3)

philippedistributive avatar philippedistributive commented on August 12, 2024

no longer seg faults but does not work as intended either.

timer-reject.js has
/**

setTimeout(async () => { throw new Error('goodbye') }, 600);
setTimeout(async () => { console.warn('this should not fire') }, 2000);
console.error('hello');

When running I get
poetry run pmjs timer-reject.js
hello
Future exception was never retrieved
future: <Future finished exception=SpiderMonkeyError('Error in file /home/philippe/Sources/PythonMonkey/timer-reject.js, on line 8:\nError: goodbye\nStack Trace: \n @/home/philippe/Sources/PythonMonkey/timer-reject.js:8:32\n')>
pythonmonkey.SpiderMonkeyError: Error in file /home/philippe/Sources/PythonMonkey/timer-reject.js, on line 8:
Error: goodbye
Stack Trace:
@/home/philippe/Sources/PythonMonkey/timer-reject.js:8:32

this should not fire

from pythonmonkey.

philippedistributive avatar philippedistributive commented on August 12, 2024

similarly in node.js:

philippe@calypso:~$ node
Welcome to Node.js v18.19.0.
Type ".help" for more information.

setTimeout(async () => { throw new Error('goodbye') }, 600);
Timeout {
_idleTimeout: 600,
_idlePrev: [TimersList],
_idleNext: [TimersList],
_idleStart: 1671,
_onTimeout: [AsyncFunction (anonymous)],
_timerArgs: undefined,
_repeat: null,
_destroyed: false,
[Symbol(refed)]: true,
[Symbol(kHasPrimitive)]: false,
[Symbol(asyncId)]: 24,
[Symbol(triggerId)]: 6
}
setTimeout(async () => { console.warn('this should not fire') }, 2000);
Timeout {
_idleTimeout: 2000,
_idlePrev: [TimersList],
_idleNext: [TimersList],
_idleStart: 1675,
_onTimeout: [AsyncFunction (anonymous)],
_timerArgs: undefined,
_repeat: null,
_destroyed: false,
[Symbol(refed)]: true,
[Symbol(kHasPrimitive)]: false,
[Symbol(asyncId)]: 26,
[Symbol(triggerId)]: 6
}
console.error('hello');
hello
undefined
Uncaught Error: goodbye
this should not fire

from pythonmonkey.

philippedistributive avatar philippedistributive commented on August 12, 2024

@wesgarland it seems the expectation is incorrect as the Error does not propagate all the way up and terminate the environment

from pythonmonkey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.