libs/cbi: Forward errors (like syntactical errors) from CBI model parser to the user...
authorSteven Barth <steven@midlink.org>
Mon, 1 Sep 2008 19:51:37 +0000 (19:51 +0000)
committerSteven Barth <steven@midlink.org>
Mon, 1 Sep 2008 19:51:37 +0000 (19:51 +0000)
libs/cbi/luasrc/cbi.lua

index 5b05c46..ebc23e0 100644 (file)
@@ -53,10 +53,7 @@ function load(cbimap, ...)
 
        local cbidir = luci.util.libpath() .. "/model/cbi/"
        local func, err = loadfile(cbidir..cbimap..".lua")
-
-       if not func then
-               return nil
-       end
+       assert(func, err)
 
        luci.i18n.loadc("cbi")