Comparison

util/pluginloader.lua @ 1441:9c6c7aa5dc60

util.pluginloader: Append "@" to chunk names (fixes weird formatting in plugin tracebacks)
author Waqas Hussain <waqas20@gmail.com>
date Sun, 28 Jun 2009 22:29:17 +0500
parent 1387:64f18488b275
child 1522:569d58d21612
comparison
equal deleted inserted replaced
1440:d3117a6ad1bf 1441:9c6c7aa5dc60
25 end 25 end
26 26
27 function load_code(plugin, resource) 27 function load_code(plugin, resource)
28 local content, err = load_resource(plugin, resource); 28 local content, err = load_resource(plugin, resource);
29 if not content then return content, err; end 29 if not content then return content, err; end
30 return loadstring(content, err); 30 return loadstring(content, "@"..err);
31 end 31 end
32 32
33 return _M; 33 return _M;