aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/generator_tables.py
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2018-06-04 15:33:10 +0200
committerVratko Polak <vrpolak@cisco.com>2018-06-04 15:33:10 +0200
commitfcea4eb3f63218e77cc594ff4322dc40d72fd632 (patch)
tree292afcd11ba69e7fadcd45a3ae2a74d430c49cf7 /resources/tools/presentation/generator_tables.py
parent2062aa4da62dc3be7f168981a55473ff4f53783b (diff)
CSIT-1110: Print NameError to reduce confusion
See https://gerrit.fd.io/r/12724 for an example mistake which also can cause NameError. Change-Id: I65c74744c027800a95014f3be48d0f522a10ce2b Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/tools/presentation/generator_tables.py')
-rw-r--r--resources/tools/presentation/generator_tables.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py
index 4fdd8c58ba..f555fce77d 100644
--- a/resources/tools/presentation/generator_tables.py
+++ b/resources/tools/presentation/generator_tables.py
@@ -43,9 +43,9 @@ def generate_tables(spec, data):
for table in spec.tables:
try:
eval(table["algorithm"])(table, data)
- except NameError:
- logging.error("The algorithm '{0}' is not defined.".
- format(table["algorithm"]))
+ except NameError as err:
+ logging.error("Probably algorithm '{alg}' is not defined: {err}".
+ format(alg=table["algorithm"], err=repr(err))
logging.info("Done.")