From 3fb346277f8fa4f0336e13689a4d9b1d9a7b4eaa Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Mon, 11 Aug 2014 14:11:17 -0700 Subject: Let's not have destructors throwing exceptions, please. --- src/LuaLoad.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/LuaLoad.cc') 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()->getIO(); @@ -51,6 +52,9 @@ struct sLua_LuaLoad { status = WAITTASK; case WAITTASK: execFile->throwError(); + status = CLEANUP; + case CLEANUP: + h->close(); } return 0; })); -- cgit v1.2.3