deno icon indicating copy to clipboard operation
deno copied to clipboard

REPL doesn't print exceptions from timeout

Open bartlomieju opened this issue 6 months ago • 1 comments

Version: Deno 1.39.0

$ deno
> setTimeout(() => { throw new Error("boom") }, 1000);
1
> setTimeout(() => { throw new Error("boom") }, 1000);
2
Uncaught Error: boom!
    at <anonymous>:2:9
    at Object.action (ext:deno_web/02_timers.js:149:11)
    at handleTimerMacrotask (ext:deno_web/02_timers.js:63:10)
    at eventLoopTick (ext:core/01_core.js:188:21)

The exception notification is printed only if another expression is evaluated. Not yet 100% sure what's going on here but the notifications are not properly received from the V8 inspector session - this is most likely caused by the event loop not getting woken up or the flow in the REPL which doesn't poll from incoming exceptions.

CC @mmastrac this might be of interest to you

bartlomieju avatar Dec 18 '23 00:12 bartlomieju