better error messageS

This commit is contained in:
2025-05-07 15:56:41 +02:00
parent 68bd9fb4f7
commit 64be8b1e89
3 changed files with 10 additions and 10 deletions

View File

@ -96,7 +96,7 @@ def testZmqHeadetTypeCount(name, num_mods, num_frames, fp):
msg = f"Expected {expected_count} '{htype}' entries, found {htype_counts[htype]}"
raise RuntimeException(msg)
except Exception as e:
raise RuntimeException(f'Failed to get zmq header count type. Error:{e}')
raise RuntimeException(f'Failed to get zmq header count type. Error:{str(e)}') from e
Log(LogLevel.INFOGREEN, f"Zmq Header type count test passed for {name}")
Log(LogLevel.INFOGREEN, f"Zmq Header type count test passed for {name}", fp)
@ -117,7 +117,7 @@ def startTestsForAll(args, fp):
testZmqHeadetTypeCount(server, args.num_mods, args.num_frames, fp)
Log(LogLevel.INFO, '\n')
except Exception as e:
raise RuntimeException(f'Synchronizer Tests failed')
raise RuntimeException(f'Synchronizer Tests failed') from e
Log(LogLevel.INFOGREEN, 'Passed all synchronizer tests for all detectors \n' + str(args.servers))