Diff

util/datamanager.lua @ 3845:4860853fc97b

util.datamanager: Return an error string when pcall fails on a loaded list file.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 10 Dec 2010 00:23:47 +0500
parent 3844:9cdc19ed3034
child 4093:36555949bd16
line wrap: on
line diff
--- a/util/datamanager.lua	Fri Dec 10 00:21:09 2010 +0500
+++ b/util/datamanager.lua	Fri Dec 10 00:23:47 2010 +0500
@@ -219,7 +219,7 @@
 	local success, ret = pcall(data);
 	if not success then
 		log("error", "Unable to load "..datastore.." storage ('"..ret.."') for user: "..(username or "nil").."@"..(host or "nil"));
-		return nil;
+		return nil, "Error reading storage";
 	end
 	return items;
 end