Embedding v8 5.3. In my embedding application, the user can make some updates and the updates are committed as one transaction when the script exits. When one statement throws an error which is caught by a try-catch block, the scope of the try-catch block determines the aborted changes. Here's an example:
try {
update1();
update2();
catch(err) {}
In the above example, if update2 throws an exception, the changes made by update1 should be aborted.
In contrast, in the following script, if update2 throws an exception, the changes made by update1 should be committed:
update1();
try {
update2();
catch(err) {}
Does v8 provide any way to register for user-specified try-catch blocks for embedders to handle this use case? I tried TryCatch.SetVerbose, but apparently it's not meant for this.
Thanks in advance.