]> git.kaiwu.me - njs.git/commit
Promise: tracking unhandled promise rejection.
authorAlexander Borisov <alexander.borisov@nginx.com>
Tue, 3 Nov 2020 12:31:41 +0000 (15:31 +0300)
committerAlexander Borisov <alexander.borisov@nginx.com>
Tue, 3 Nov 2020 12:31:41 +0000 (15:31 +0300)
commit0bca4b3e0ec7d5cacbe431af1c4c1ce49ddc9596
tree69a07c71d9675d5c5d609fe5d6419ed0e647bd4b
parentef696d43f036f6722838f7929007b494dd215a40
Promise: tracking unhandled promise rejection.

By default, promises should finish processing normally for .then(),
.catch(), .finally() and so on.  The patch adds the ability to report
unhandled exception from promises to the user.

This closes #346 issue on GitHub.
18 files changed:
nginx/ngx_http_js_module.c
nginx/ngx_stream_js_module.c
src/njs.h
src/njs_promise.c
src/njs_shell.c
src/njs_vm.c
src/njs_vm.h
test/js/promise_catch_then_throw_catch.js [new file with mode: 0644]
test/js/promise_catch_throw.js [new file with mode: 0644]
test/js/promise_finally_throw.js [new file with mode: 0644]
test/js/promise_finally_throw_catch.js [new file with mode: 0644]
test/js/promise_reject_catch.js [new file with mode: 0644]
test/js/promise_reject_post_catch.js [new file with mode: 0644]
test/js/promise_then_throw.js [new file with mode: 0644]
test/js/promise_then_throw_catch.js [new file with mode: 0644]
test/js/promise_two_first_then_throw.js [new file with mode: 0644]
test/js/promise_two_then_throw.js [new file with mode: 0644]
test/njs_expect_test.exp