仓库指标
- 星标
- (8,663 个星标)
- PR 合并指标
- (平均合并 45天 12小时) (30 天内合并 52 个 PR)
描述
Cython currently warns about function that cannot propagate the exceptions raised in their body. Often, this is because the function was accidentally declared without except clause. But in some cases, exceptions in the function body are not expected and only get raised by accident or oversight.
It would be nice if Cython could point to the code lines that raise exceptions, or about the first couple of them. If exceptions are unexpected, this would help users understand why they appear at all.
This can be implemented mostly in the CCodeWriter. The error_goto() method can collect the current code line in a new set attribute code.funcstate.error_lines, from where the put_unraisable() method could pick them up and warn() about them.