Suzhou-Tongyuan / jnumpy

Writing Python C extensions in Julia within 5 minutes.
MIT License
234 stars 8 forks source link

Wrapping Julia errors with a RuntimeError might be too general #48

Closed thautwarm closed 2 years ago

thautwarm commented 2 years ago

https://github.com/Suzhou-Tongyuan/jnumpy/blob/65cea6cc6a750911ab2c1545d94af26008e7b240/TyPython/src/CPython.Dev.jl#L102

songjhaha commented 2 years ago

Handle some cases of julia errors? like:

Julia Python
MethodError TypeError
BoundsError IndexError
KeyError KeyError
thautwarm commented 2 years ago

This is great. We don't have to consider the overhead of processing errors, because the error handling function is not inlined (so won't affect the no-exception path).