Print a more user friendly error message on validation failure
This commit is contained in:
@@ -264,7 +264,12 @@ dir but you forgot to put quotes around the directory, since it contains spaces.
|
||||
# look at our settings.py file
|
||||
mw_parser = configParser.MultiWorldParser("settings.py")
|
||||
mw_parser.parse()
|
||||
mw_parser.validate()
|
||||
try:
|
||||
mw_parser.validate()
|
||||
except Exception:
|
||||
logging.error("Please investigate these errors in settings.py then try running Overviewer again")
|
||||
return 1
|
||||
|
||||
|
||||
# create our asset manager... ASSMAN
|
||||
assetMrg = assetmanager.AssetManager(destdir)
|
||||
|
||||
@@ -289,7 +289,8 @@ class MultiWorldParser(object):
|
||||
origs[key + "_orig"] = world[key]
|
||||
world[key] = val
|
||||
except Exception as e:
|
||||
print "Error validating %s: %r" % (key, e)
|
||||
logging.error("Error validating '%s' option in render definition for '%s':", key, worldname)
|
||||
logging.error(e)
|
||||
raise e
|
||||
world['name'] = worldname
|
||||
world.update(origs)
|
||||
|
||||
Reference in New Issue
Block a user