The Battle for Wesnoth  1.19.0+dev
Classes | Macros
lua_jailbreak_exception.hpp File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  lua_jailbreak_exception
 Base class for exceptions that want to be thrown 'through' lua. More...


 Helper macro for classes deriving from lua_jailbreak_exception. More...

Macro Definition Documentation


virtual type* clone() const final { return new type(*this); } \
virtual void execute() final \
{ \
type exception(dynamic_cast<type&>(*jailbreak_exception)); \
throw exception; \

Helper macro for classes deriving from lua_jailbreak_exception.

lua_jailbreak_exception has several pure virtual functions, this macro implements them properly. This macro needs to be placed in the definition of the most derived class, which uses lua_jailbreak_exception as baseclass.

typeThe type of the class whc

Definition at line 91 of file lua_jailbreak_exception.hpp.