本文整理汇总了Python中djinni.exception.CPyException类的典型用法代码示例。如果您正苦于以下问题:Python CPyException类的具体用法?Python CPyException怎么用?Python CPyException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CPyException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_record_with_derivings_f1
def get_record_with_derivings_f1(cself):
try:
_ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).key1)
return _ret
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例2: get_client_returned_record_f3
def get_client_returned_record_f3(cself):
try:
with CPyString.fromPyOpt(CPyRecord.toPy(None, cself).misc) as py_obj:
return py_obj.release_djinni_string()
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例3: get_foo_extensible_record_f1
def get_foo_extensible_record_f1(cself):
try:
_ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).number1)
return _ret
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例4: update_static_messg_to
def update_static_messg_to(static_string):
with CPyString.fromPy(static_string) as pys_static_string:
_ret_c = lib.cw__foo_static_update_static_messg_to(pys_static_string.release_djinni_string())
CPyException.toPyCheckAndRaise(_ret_c)
_ret = CPyString.toPy(_ret_c)
assert _ret is not None
return _ret
示例5: __python_next
def __python_next(cself):
try:
with CPyString.fromPyOpt(next(CPyObjectProxy.toPyIter(cself))) as py_obj:
return py_obj.release_djinni_string()
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例6: get_foo_constants_f1
def get_foo_constants_f1(cself):
try:
_ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).some_integer)
return _ret
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例7: get_assorted_primitives_f9
def get_assorted_primitives_f9(cself):
try:
with CPyBoxedI8.fromPyOpt(CPyRecord.toPy(None, cself).o_eight) as py_obj:
return py_obj.release_djinni_boxed()
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例8: get_foo_client_returned_record_f1
def get_foo_client_returned_record_f1(cself):
try:
_ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).record_id)
return _ret
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例9: __python_next
def __python_next(cself):
try:
_ret = CPyPrimitive.fromPy(next(CPyObjectProxy.toPyIter(cself)))
return _ret
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例10: __get_elem
def __get_elem(cself, index):
try:
with CPyBinary.fromPyOpt(CPyObject.toPy(None, cself)[index]) as py_obj:
return py_obj.release_djinni_binary()
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例11: id_binary
def id_binary(b):
with CPyBinary.fromPy(b) as pybin_b:
_ret_c = lib.cw__test_helpers_id_binary(pybin_b.release_djinni_binary())
CPyException.toPyCheckAndRaise(_ret_c)
_ret = CPyBinary.toPy(_ret_c)
assert _ret is not None
return _ret
示例12: get_assorted_primitives_f7
def get_assorted_primitives_f7(cself):
try:
_ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).fsixtyfour)
return _ret
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例13: __get_elem
def __get_elem(cself, index):
try:
_ret = CPyPrimitive.fromPy(CPyObject.toPy(None, cself)[index])
return _ret
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL
示例14: on_string_change
def on_string_change(self, private_string):
with CPyString.fromPy(private_string) as pys_private_string:
_ret_c = lib.cw__foo_listener_bf_on_string_change(self._cpp_impl, pys_private_string.release_djinni_string())
CPyException.toPyCheckAndRaise(_ret_c)
_ret = CPyString.toPy(_ret_c)
assert _ret is not None
return _ret
示例15: get_some_const_record_f2
def get_some_const_record_f2(cself):
try:
_ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).number2)
return _ret
except Exception as _djinni_py_e:
CPyException.setExceptionFromPy(_djinni_py_e)
return ffi.NULL