75 local ok, level, err = config.load(filename); |
75 local ok, level, err = config.load(filename); |
76 if not ok then |
76 if not ok then |
77 print("\n"); |
77 print("\n"); |
78 print("**************************"); |
78 print("**************************"); |
79 if level == "parser" then |
79 if level == "parser" then |
80 print("A problem occured while reading the config file "..(CFG_CONFIGDIR or ".").."/prosody.cfg.lua"); |
80 print("A problem occured while reading the config file "..(CFG_CONFIGDIR or ".").."/prosody.cfg.lua"..":"); |
|
81 print(""); |
81 local err_line, err_message = tostring(err):match("%[string .-%]:(%d*): (.*)"); |
82 local err_line, err_message = tostring(err):match("%[string .-%]:(%d*): (.*)"); |
82 print("Error"..(err_line and (" on line "..err_line) or "")..": "..(err_message or tostring(err))); |
83 if err:match("chunk has too many syntax levels$") then |
|
84 print("An Include statement in a config file is including an already-included"); |
|
85 print("file and causing an infinite loop. An Include statement in a config file is..."); |
|
86 else |
|
87 print("Error"..(err_line and (" on line "..err_line) or "")..": "..(err_message or tostring(err))); |
|
88 end |
83 print(""); |
89 print(""); |
84 elseif level == "file" then |
90 elseif level == "file" then |
85 print("Prosody was unable to find the configuration file."); |
91 print("Prosody was unable to find the configuration file."); |
86 print("We looked for: "..(CFG_CONFIGDIR or ".").."/prosody.cfg.lua"); |
92 print("We looked for: "..(CFG_CONFIGDIR or ".").."/prosody.cfg.lua"); |
87 print("A sample config file is included in the Prosody download called prosody.cfg.lua.dist"); |
93 print("A sample config file is included in the Prosody download called prosody.cfg.lua.dist"); |