Include the traceback in exceptions
This makes debugging into the cython side of the code much easier.
This commit is contained in:
@@ -1025,7 +1025,7 @@ cdef class _DynamicStructReader:
|
|||||||
try:
|
try:
|
||||||
return self._get(field)
|
return self._get(field)
|
||||||
except KjException as e:
|
except KjException as e:
|
||||||
raise e._to_python()
|
raise e._to_python(), None, _sys.exc_info()[2]
|
||||||
|
|
||||||
cpdef _get_by_field(self, _StructSchemaField field):
|
cpdef _get_by_field(self, _StructSchemaField field):
|
||||||
return to_python_reader(self.thisptr.getByField(field.thisptr), self._parent)
|
return to_python_reader(self.thisptr.getByField(field.thisptr), self._parent)
|
||||||
@@ -1225,7 +1225,7 @@ cdef class _DynamicStructBuilder:
|
|||||||
try:
|
try:
|
||||||
return self._get(field)
|
return self._get(field)
|
||||||
except KjException as e:
|
except KjException as e:
|
||||||
raise e._to_python()
|
raise e._to_python(), None, _sys.exc_info()[2]
|
||||||
|
|
||||||
cpdef _set(self, field, value):
|
cpdef _set(self, field, value):
|
||||||
_setDynamicField(self.thisptr, field, value, self._parent)
|
_setDynamicField(self.thisptr, field, value, self._parent)
|
||||||
@@ -1237,7 +1237,7 @@ cdef class _DynamicStructBuilder:
|
|||||||
try:
|
try:
|
||||||
self._set(field, value)
|
self._set(field, value)
|
||||||
except KjException as e:
|
except KjException as e:
|
||||||
raise e._to_python()
|
raise e._to_python(), None, _sys.exc_info()[2]
|
||||||
|
|
||||||
cpdef _has(self, field):
|
cpdef _has(self, field):
|
||||||
return self.thisptr.has(field)
|
return self.thisptr.has(field)
|
||||||
@@ -1456,7 +1456,7 @@ cdef class _DynamicStructPipeline:
|
|||||||
try:
|
try:
|
||||||
return self._get(field)
|
return self._get(field)
|
||||||
except KjException as e:
|
except KjException as e:
|
||||||
raise e._to_python()
|
raise e._to_python(), None, _sys.exc_info()[2]
|
||||||
|
|
||||||
property schema:
|
property schema:
|
||||||
"""A property that returns the _StructSchema object matching this reader"""
|
"""A property that returns the _StructSchema object matching this reader"""
|
||||||
@@ -1936,7 +1936,7 @@ cdef class _RemotePromise:
|
|||||||
try:
|
try:
|
||||||
return self._get(field)
|
return self._get(field)
|
||||||
except KjException as e:
|
except KjException as e:
|
||||||
raise e._to_python()
|
raise e._to_python(), None, _sys.exc_info()[2]
|
||||||
|
|
||||||
property schema:
|
property schema:
|
||||||
"""A property that returns the _StructSchema object matching this reader"""
|
"""A property that returns the _StructSchema object matching this reader"""
|
||||||
@@ -2039,7 +2039,7 @@ cdef class _DynamicCapabilityServer:
|
|||||||
try:
|
try:
|
||||||
return getattr(self.server, field)
|
return getattr(self.server, field)
|
||||||
except KjException as e:
|
except KjException as e:
|
||||||
raise e._to_python()
|
raise e._to_python(), None, _sys.exc_info()[2]
|
||||||
|
|
||||||
cdef class _DynamicCapabilityClient:
|
cdef class _DynamicCapabilityClient:
|
||||||
cdef C_DynamicCapability.Client thisptr
|
cdef C_DynamicCapability.Client thisptr
|
||||||
@@ -2121,7 +2121,7 @@ cdef class _DynamicCapabilityClient:
|
|||||||
raise AttributeError('Method named %s not found' % name)
|
raise AttributeError('Method named %s not found' % name)
|
||||||
return _partial(self._send, name)
|
return _partial(self._send, name)
|
||||||
except KjException as e:
|
except KjException as e:
|
||||||
raise e._to_python()
|
raise e._to_python(), None, _sys.exc_info()[2]
|
||||||
|
|
||||||
cpdef upcast(self, schema) except +reraise_kj_exception:
|
cpdef upcast(self, schema) except +reraise_kj_exception:
|
||||||
cdef _InterfaceSchema s
|
cdef _InterfaceSchema s
|
||||||
|
|||||||
Reference in New Issue
Block a user