Skip to content
Snippets Groups Projects
Commit 250d031a authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

Explicitly use thread-local buffer for C++ exceptions

This patch explicitly saves Exception to a thread-local variable inside
struct cord on tnt_raise(). This variable can be used to safetly
re-throw last exception from any place (not only from catch() block).
This technique requires exception to be thrown and catched by pointers.
tnt_raise macros was rewritten and all 'catch (Exception &)' blocks were
substituted with 'catch (Exception *e)'.

This patch also adds a new feature to box.raise() function.
When called without arguments box.raise() re-throws last exception (if
any).

These changes needed to implement proper handlings of exception for FFI
calls.
parent 9192cbc2
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment