Repository navigation
Commit c4e29bd
committed
JSCBC-1524: Surface C++ exceptions at entry points as JS errors
Changes
-------
* Define `NODE_ADDON_API_CPP_EXCEPTIONS` and
`NODE_ADDON_API_CPP_EXCEPTIONS_ALL`, so the exception mode is explicit
and every entry point turns any C++ exception that escapes it into a
thrown JS error rather than aborting the process
* Report a core exception thrown by a transaction operation that cannot
start through the operation's callback, so it rejects with the usual
typed error and the callback runs exactly once
* Convert transaction operation arguments before creating the callback
cookie, so a bad argument throws with no cookie to resolve
* Add tests for a CAS string that is not a 64-bit number and for
transaction operations made before any attempt
Change-Id: I3518304a9edebd856c459ac67fa109593e154f7e
Reviewed-on: https://review.couchbase.org/c/couchnode/+/256435
Tested-by: Jared Casey <jared.casey@couchbase.com>
Reviewed-by: Mateusz <matt.wozakowski@couchbase.com>1 parent ad15c97 commit c4e29bd
4 files changed
Lines changed: 302 additions & 133 deletions
File tree
- src
- test/suites
- kv
- transactions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
206 | 211 | | |
207 | 212 | | |
208 | 213 | | |
| |||
0 commit comments