# HG changeset patch # User jbe # Date 1427062207 -3600 # Node ID ba68ef9e7c907ba46287155c698de2a8d2f96a46 # Parent d34b7b5e5e5c76927c4507e328b932d9fc53d38d Removed some redundancy from error messages diff -r d34b7b5e5e5c -r ba68ef9e7c90 framework/env/execute/chunk.lua --- a/framework/env/execute/chunk.lua Sun Mar 22 23:08:18 2015 +0100 +++ b/framework/env/execute/chunk.lua Sun Mar 22 23:10:07 2015 +0100 @@ -35,10 +35,7 @@ WEBMCP_BASE_PATH, 'app', app, module, chunk .. '.lua' ) - local func, load_errmsg = loadcached(file_path) - if not func then - error('Could not load file "' .. file_path .. '": ' .. load_errmsg) - end + local func = assert(loadcached(file_path)) if id or params then param.exchange(id, params) diff -r d34b7b5e5e5c -r ba68ef9e7c90 framework/env/execute/file_path.lua --- a/framework/env/execute/file_path.lua Sun Mar 22 23:08:18 2015 +0100 +++ b/framework/env/execute/file_path.lua Sun Mar 22 23:10:07 2015 +0100 @@ -14,10 +14,7 @@ local file_path = args.file_path local id = args.id local params = args.params - local func, load_errmsg = loadcached(file_path) - if not func then - error('Could not load file "' .. file_path .. '": ' .. load_errmsg) - end + local func, load_errmsg = assert(loadcached(file_path)) if id or params then param.exchange(id, params) end diff -r d34b7b5e5e5c -r ba68ef9e7c90 framework/env/locale/_get_translation_table.lua --- a/framework/env/locale/_get_translation_table.lua Sun Mar 22 23:08:18 2015 +0100 +++ b/framework/env/locale/_get_translation_table.lua Sun Mar 22 23:10:07 2015 +0100 @@ -11,7 +11,7 @@ local filename = encode.file_path(WEBMCP_BASE_PATH, "locale", "translations." .. language_code .. ".lua") local func, load_errmsg = loadcached(filename) if not func then - error('Could not load translation file "' .. filename .. '": ' .. load_errmsg) + error('Could not load translation file: ' .. load_errmsg) end translation_table = func() if type(translation_table) ~= "table" then