Skip to content

Commit

Permalink
Improve error message captured
Browse files Browse the repository at this point in the history
  • Loading branch information
kuettai committed Oct 24, 2024
1 parent 551f452 commit d17e8f9
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions services/Evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,12 @@ def runSingleCheck(tmp_obj, method_name):
code = e.response['Error']['Code']
msg = e.response['Error']['Message']
print(code, msg)
print(traceback.format_exc())
traceback.format_exc()
emsg = traceback.format_exc()
except Exception:
print(traceback.format_exc())
traceback.format_exc()
emsg = traceback.format_exc()

return traceback.format_exc()
print(emsg)
return emsg

class Evaluator():
def __init__(self):
Expand Down Expand Up @@ -83,13 +82,11 @@ def run(self, serviceName):
futures = [executor.submit(runSingleCheck, self, method) for method in filteredMethods]

for future in cf.as_completed(futures):
for fr in future.result():
if fr == 'OK':
continue
else:
emsg.append(fr)
ecnt += 1

if future.result() == 'OK':
continue
else:
emsg.append(future.result())
ecnt += 1
else:
for method in methods:
if not rules or str.lower(method[6:]) in rules:
Expand Down

0 comments on commit d17e8f9

Please sign in to comment.