summaryrefslogtreecommitdiffstats
path: root/app/acf_cli-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2012-02-02 14:24:24 +0000
committerTed Trask <ttrask01@yahoo.com>2012-02-02 14:24:24 +0000
commit27c777f203a409442ca184f3aa20e703b4784927 (patch)
tree7552db683d705ad53eeb003a5f748448ea512281 /app/acf_cli-controller.lua
parent66ce6092f2f81e8a0dc01c340f5d7d9d7b81d1cb (diff)
downloadacf-core-27c777f203a409442ca184f3aa20e703b4784927.tar.bz2
acf-core-27c777f203a409442ca184f3aa20e703b4784927.tar.xz
Fixed acf-cli to work with new mvc.lua changes
Diffstat (limited to 'app/acf_cli-controller.lua')
-rw-r--r--app/acf_cli-controller.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/acf_cli-controller.lua b/app/acf_cli-controller.lua
index 295bd47..f3b7d6f 100644
--- a/app/acf_cli-controller.lua
+++ b/app/acf_cli-controller.lua
@@ -2,6 +2,8 @@ module(..., package.seeall)
require("posix")
+local parent_exception_handler
+
mvc = {}
mvc.on_load = function (self, parent)
-- Make sure we have some kind of sane defaults for libdir
@@ -11,6 +13,8 @@ mvc.on_load = function (self, parent)
self.conf.default_controller = "welcome"
self.conf.viewtype = "serialized"
+ parent_exception_handler = parent.exception_handler
+
-- this sets the package path for us and our children
for p in string.gmatch(self.conf.libdir, "[^,]+") do
package.path= p .. "?.lua;" .. package.path
@@ -26,18 +30,16 @@ end
mvc.post_exec = function ()
end
---[[
view_resolver = function(self)
return function (viewtable)
print(session.serialize("result", viewtable))
end
end
---]]
---[[ The parent exception handler is just fine
+
exception_handler = function (self, message )
print(session.serialize("exception", message))
+ parent_exception_handler(self, message)
end
---]]
redirect = function (self, str, result)
return result