prosody
changeset 8288 433b2a41351f
parent 8271 e21d82551e05
parent 8279 5ebad58b2548
child 8638 47e3b8b6f17a
equal deleted inserted replaced
8274:c09deab9989e 8288:433b2a41351f
    91 	local ok, level, err = config.load(filename);
    91 	local ok, level, err = config.load(filename);
    92 	if not ok then
    92 	if not ok then
    93 		print("\n");
    93 		print("\n");
    94 		print("**************************");
    94 		print("**************************");
    95 		if level == "parser" then
    95 		if level == "parser" then
    96 			print("A problem occurred while reading the config file "..(CFG_CONFIGDIR or ".").."/prosody.cfg.lua"..":");
    96 			print("A problem occured while reading the config file "..filename);
    97 			print("");
    97 			print("");
    98 			local err_line, err_message = tostring(err):match("%[string .-%]:(%d*): (.*)");
    98 			local err_line, err_message = tostring(err):match("%[string .-%]:(%d*): (.*)");
    99 			if err:match("chunk has too many syntax levels$") then
    99 			if err:match("chunk has too many syntax levels$") then
   100 				print("An Include statement in a config file is including an already-included");
   100 				print("An Include statement in a config file is including an already-included");
   101 				print("file and causing an infinite loop. An Include statement in a config file is...");
   101 				print("file and causing an infinite loop. An Include statement in a config file is...");
   103 				print("Error"..(err_line and (" on line "..err_line) or "")..": "..(err_message or tostring(err)));
   103 				print("Error"..(err_line and (" on line "..err_line) or "")..": "..(err_message or tostring(err)));
   104 			end
   104 			end
   105 			print("");
   105 			print("");
   106 		elseif level == "file" then
   106 		elseif level == "file" then
   107 			print("Prosody was unable to find the configuration file.");
   107 			print("Prosody was unable to find the configuration file.");
   108 			print("We looked for: "..(CFG_CONFIGDIR or ".").."/prosody.cfg.lua");
   108 			print("We looked for: "..filename);
   109 			print("A sample config file is included in the Prosody download called prosody.cfg.lua.dist");
   109 			print("A sample config file is included in the Prosody download called prosody.cfg.lua.dist");
   110 			print("Copy or rename it to prosody.cfg.lua and edit as necessary.");
   110 			print("Copy or rename it to prosody.cfg.lua and edit as necessary.");
   111 		end
   111 		end
   112 		print("More help on configuring Prosody can be found at https://prosody.im/doc/configure");
   112 		print("More help on configuring Prosody can be found at https://prosody.im/doc/configure");
   113 		print("Good luck!");
   113 		print("Good luck!");