mirror of
https://github.com/denoland/deno.git
synced 2024-11-30 16:40:57 -05:00
7471587d29
This commit adds support for "rejectionhandled" Web Event and "rejectionHandled" Node event. ```js import process from "node:process"; process.on("rejectionHandled", (promise) => { console.log("rejectionHandled", reason, promise); }); window.addEventListener("rejectionhandled", (event) => { console.log("rejectionhandled", event.reason, event.promise); }); ``` --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
7 lines
161 B
Text
7 lines
161 B
Text
[WILDCARD]
|
|
Hello world!
|
|
globalThis.addEventListener("unhandledrejection");
|
|
Added catch handler to the promise
|
|
Web rejectionhandled
|
|
Node rejectionHandled
|
|
Success
|