Base class for exceptions that want to be thrown 'through' lua. More...
#include <lua_jailbreak_exception.hpp>
Public Member Functions | |
virtual | ~tlua_jailbreak_exception () throw () |
void | store () const throw () |
Stores a copy the current exception to be rethrown. More... | |
Static Public Member Functions | |
static void | rethrow () |
Rethrows the stored exception. More... | |
Static Protected Attributes | |
static tlua_jailbreak_exception * | jailbreak_exception = nullptr |
The exception to be rethrown. More... | |
Private Member Functions | |
virtual tlua_jailbreak_exception * | clone () const =0 |
Creates a copy of the current exception. More... | |
virtual void | execute ()=0 |
Executes the exception. More... | |
Static Private Member Functions | |
static void | clear () throw () |
Clears the current exception. More... | |
Base class for exceptions that want to be thrown 'through' lua.
Classes inheriting from this class need to use the IMPLEMENT_LUA_JAILBREAK_EXCEPTION macro in the class definition.
Definition at line 26 of file lua_jailbreak_exception.hpp.
|
inlinevirtual |
Definition at line 29 of file lua_jailbreak_exception.hpp.
|
staticprivate |
Clears the current exception.
Definition at line 57 of file lua_jailbreak_exception.cpp.
References jailbreak_exception.
Referenced by rethrow().
|
privatepure virtual |
Creates a copy of the current exception.
The copy is allocated with new
and is implemented by the IMPLEMENT_LUA_JAILBREAK_EXCEPTION macro.
Referenced by store().
|
privatepure virtual |
Executes the exception.
Throws a copy of the stored jailbreak_exception. The caller is responsible for clearing jailbreak_exception after the throw. The function is implemented by the IMPLEMENT_LUA_JAILBREAK_EXCEPTION macro.
Referenced by rethrow().
|
static |
Rethrows the stored exception.
It is safe to call this function is no exception is stored.
Definition at line 33 of file lua_jailbreak_exception.cpp.
References clear(), execute(), and jailbreak_exception.
Referenced by luaW_pcall(), and lua_kernel_base::protected_call().
void tlua_jailbreak_exception::store | ( | ) | const | |
throw | ( | |||
) |
Stores a copy the current exception to be rethrown.
Definition at line 21 of file lua_jailbreak_exception.cpp.
References clone(), and jailbreak_exception.
|
staticprotected |
The exception to be rethrown.
Definition at line 44 of file lua_jailbreak_exception.hpp.