trigger: make trigger_run() exception safe
To convert engine and space infrastructure to C, we need to make txn usable from C code. The only reason why we can't convert txn.cc to C right now is triggers: they are set from alter.cc and may throw exceptions. To handle this, let's make trigger_run() catch all exceptions and return an error code instead. For C++ code, introduce trigger_run_xc() which calls trigger_run() under the hood and throws the exception suppressed by it. Needed for #2776
Showing
- src/CMakeLists.txt 1 addition, 0 deletionssrc/CMakeLists.txt
- src/box/alter.cc 5 additions, 5 deletionssrc/box/alter.cc
- src/box/applier.cc 1 addition, 1 deletionsrc/box/applier.cc
- src/box/recovery.cc 1 addition, 1 deletionsrc/box/recovery.cc
- src/box/schema.cc 1 addition, 1 deletionsrc/box/schema.cc
- src/box/session.cc 2 additions, 12 deletionssrc/box/session.cc
- src/box/txn.cc 15 additions, 6 deletionssrc/box/txn.cc
- src/trigger.cc 47 additions, 0 deletionssrc/trigger.cc
- src/trigger.h 14 additions, 8 deletionssrc/trigger.h
Loading
Please register or sign in to comment