📅  最后修改于: 2022-03-11 14:59:50.383000             🧑  作者: Mango
new Promise((resolve, reject) => {
setTimeout(() => reject('woops'), 500);
});
/* Output:
$ node test.js
(node:8128) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): woops
(node:8128) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. */