Assists when you need to "throw" C++ exception from below code compiled by C compiler. More...
#include <libnebular-plugin.hpp>
Public Member Functions | |
RawCExceptionLongJmp (Loki::Functor< void > newCleanupCode=Loki::Functor< void >()) | |
~RawCExceptionLongJmp () | |
template<typename Return > | |
Return | run (Loki::Functor< Return > code) |
template<typename CurrException > | |
void | doThrow (const CurrException &newException) |
Assists when you need to "throw" C++ exception from below code compiled by C compiler.
For code being argument of RawCExceptionLongJmp::run()
: call to RawCExceptionLongJmp::doThrow()
calls longjmp()
to setjmp()
been made at RawCExceptionLongJmp
construction and there throw
-s exception, which was an argument of RawCExceptionLongJmp::doThrow()
.
Remember that exceptions cannot unwind stack when there are functions compiled by C compiler.
Definition at line 252 of file libnebular-plugin.hpp.
libnebular::RawCExceptionLongJmp::RawCExceptionLongJmp | ( | Loki::Functor< void > | newCleanupCode = Loki::Functor< void >() |
) |
[in] | newCleanupCode | Called when there was call to doThrow() in code (so, in that case we may need some cleanup before performing real throw ) |
Definition at line 381 of file libnebular.cpp.
libnebular::RawCExceptionLongJmp::~RawCExceptionLongJmp | ( | ) |
Definition at line 388 of file libnebular.cpp.
void libnebular::RawCExceptionLongJmp::doThrow | ( | const CurrException & | newException | ) | [inline] |
[in] | newException | Should be descendant of std::exception |
RawCExceptionLongJmp
Definition at line 53 of file libnebular-plugin.templates.hpp.
Return libnebular::RawCExceptionLongJmp::run | ( | Loki::Functor< Return > | code | ) | [inline] |
[in] | code | Can call doThrow method of this object. (How code knows about which is that object? That's problem to solve by you.) |
Definition at line 66 of file libnebular-plugin.templates.hpp.