luci-base: improve string format error reporting
authorJo-Philipp Wich <jo@mein.io>
Thu, 4 Aug 2016 09:37:13 +0000 (11:37 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 4 Aug 2016 09:45:30 +0000 (11:45 +0200)
commit240b8c4b6e5597f3f89f4382df49c123ab114c46
tree69659066ce9e75be45b3d9842ccf9fa3f7593f11
parent1367f7b624e9ee926cdbd3235a9fec4450c904b5
luci-base: improve string format error reporting

In mod metamethod, execute string format under pcall() and rethrow error in
caller context to report caller of function in errors and not the meta
method itself.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/util.lua