Skip to content
Snippets Groups Projects
Commit c6bdcd0e authored by David Verelst's avatar David Verelst
Browse files

prepost.GenerateDLCs: catch eval error from DLC sheet for easier debug

parent ec04ca6d
No related branches found
No related tags found
No related merge requests found
...@@ -182,7 +182,13 @@ class GeneralDLC(object): ...@@ -182,7 +182,13 @@ class GeneralDLC(object):
formula = formula.replace(',', '.') formula = formula.replace(',', '.')
formula = formula.replace(';', ',') formula = formula.replace(';', ',')
formula = formula.replace('\n', ' ') formula = formula.replace('\n', ' ')
flist.append(eval(formula)) try:
flist.append(eval(formula))
except Exception as exc:
print('following formula failed to execute:')
print(formula)
print('and raised the following exception:')
raise exc
dlc[fkey] = flist dlc[fkey] = flist
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment