summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/LuaTask.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/LuaTask.h b/includes/LuaTask.h
index 50226cd..1f7a0b5 100644
--- a/includes/LuaTask.h
+++ b/includes/LuaTask.h
@@ -12,10 +12,11 @@ class LuaMainTask;
class LuaExecCell {
public:
LuaExecCell();
- virtual ~LuaExecCell() { }
+ virtual ~LuaExecCell() { if (m_exception) delete m_exception; }
void detach() { m_detached = true; }
void exec(LuaMainTask * mainTask);
- bool gotError() { return m_gotError; }
+ bool gotError() { return m_gotError || m_exception; }
+ void throwError() throw (GeneralException);
protected:
virtual void run(Lua &) = 0;
void setError() { m_gotError = true; }
@@ -23,6 +24,7 @@ class LuaExecCell {
Events::Async m_event;
bool m_detached = false;
bool m_gotError = false;
+ GeneralException * m_exception = NULL;
friend class LuaTask;
LuaExecCell(const LuaExecCell &) = delete;