common-workflow-language / common-workflow-language/cwltool
Errors are noisy on python3
- Dominant language
- Python
- Stars
- 376
- Forks
- 255
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 12
Description
Schema salad and cwltool use a catch and re-raise pattern extensively for managing exceptions. Python3 has different behavior than Python2 around exceptions raised in exception handlers. In Python2, the newly raised exception replaces the current one, and str() only provides the exception message. In Python3, the current exception is saved as an inner exception and the entire exception chain and stack traces are reported in the default str() representation.
Fixes:
* Use six.reraise()
* Adjust logging to explicitly print only the exception message except when --debug is enabled or for unexpected/unhandled exceptions.
Contributor guide
Assessment
This issue has not been assessed yet.