mirror of
https://github.com/exaloop/codon.git
synced 2025-06-03 15:03:52 +08:00
Fix PyErrors
This commit is contained in:
parent
921cf74ce2
commit
3adb42b3b9
@ -1641,7 +1641,7 @@ class _PyWrap:
|
|||||||
return fn(*an).__to_py__()
|
return fn(*an).__to_py__()
|
||||||
except PyError:
|
except PyError:
|
||||||
pass
|
pass
|
||||||
PyError("cannot dispatch " + F)
|
raise PyError("cannot dispatch " + F)
|
||||||
|
|
||||||
def wrap_multiple(obj: cobj, args: Ptr[cobj], nargs: int, T: type, F: Static[str]):
|
def wrap_multiple(obj: cobj, args: Ptr[cobj], nargs: int, T: type, F: Static[str]):
|
||||||
# print(f'[c] nonmethod: {T.__class__.__name__} {F} {obj} {args} {nargs}')
|
# print(f'[c] nonmethod: {T.__class__.__name__} {F} {obj} {args} {nargs}')
|
||||||
@ -1661,7 +1661,7 @@ class _PyWrap:
|
|||||||
return fn(*an).__to_py__()
|
return fn(*an).__to_py__()
|
||||||
except PyError:
|
except PyError:
|
||||||
pass
|
pass
|
||||||
PyError("cannot dispatch " + F)
|
raise PyError("cannot dispatch " + F)
|
||||||
|
|
||||||
def wrap_get(obj: cobj, closure: cobj, T: type, S: Static[str]):
|
def wrap_get(obj: cobj, closure: cobj, T: type, S: Static[str]):
|
||||||
return getattr(T.__from_py__(obj), S).__to_py__()
|
return getattr(T.__from_py__(obj), S).__to_py__()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user