Skip to content

Commit

Permalink
Merge pull request #4091 from AllskyTeam/4074-dont-trap-exceptions-at…
Browse files Browse the repository at this point in the history
…-debug-level-4

#4074 Don't trap errors at log level 4
  • Loading branch information
Alex-developer authored Dec 19, 2024
2 parents 3f7967a + c250275 commit c9e76ed
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scripts/flow-runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,14 @@ def signalHandler(sig, frame):
if 'arguments' in shared.flow[shared.step]['metadata']:
arguments = shared.flow[shared.step]['metadata']['arguments']

try:
if shared.LOGLEVEL == 4:
result = globals()[method](arguments, shared.args.event)
except Exception as e:
eType, eObject, eTraceback = sys.exc_info()
shared.log(0, f"ERROR: Module {fileName} failed on line {eTraceback.tb_lineno} - {e}")
else:
try:
result = globals()[method](arguments, shared.args.event)
except Exception as e:
eType, eObject, eTraceback = sys.exc_info()
shared.log(0, f"ERROR: Module {fileName} failed on line {eTraceback.tb_lineno} - {e}")

endTime = datetime.now()
elapsedTime = (((endTime - startTime).total_seconds()) * 1000) / 1000
Expand Down

0 comments on commit c9e76ed

Please sign in to comment.