summaryrefslogtreecommitdiff
path: root/src/LuaLoad.cc
diff options
context:
space:
mode:
authorNicolas Noble <nnoble@blizzard.com>2014-08-11 14:11:17 -0700
committerNicolas Noble <nnoble@blizzard.com>2014-08-11 14:11:17 -0700
commit3fb346277f8fa4f0336e13689a4d9b1d9a7b4eaa (patch)
tree986bb06cde77780162f933f86be079670c2395d5 /src/LuaLoad.cc
parentae874e92caa10f9dfd74c63827905063a2c5717c (diff)
Let's not have destructors throwing exceptions, please.
Diffstat (limited to 'src/LuaLoad.cc')
-rw-r--r--src/LuaLoad.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/LuaLoad.cc b/src/LuaLoad.cc
index 8e634b5..b600387 100644
--- a/src/LuaLoad.cc
+++ b/src/LuaLoad.cc
@@ -28,6 +28,7 @@ struct sLua_LuaLoad {
OPENING,
CREATETASK,
WAITTASK,
+ CLEANUP,
} status;
if (L.isobject()) {
h = L.recast<LuaIO>()->getIO();
@@ -51,6 +52,9 @@ struct sLua_LuaLoad {
status = WAITTASK;
case WAITTASK:
execFile->throwError();
+ status = CLEANUP;
+ case CLEANUP:
+ h->close();
}
return 0;
}));