MCPcopy Create free account
hub / github.com/apache/tvm-ffi / raise_error

Function raise_error

tests/python/test_error.py:65–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63 record_object = []
64
65 def raise_error() -> None:
66 try:
67 fapply(cxx_test_raise_error, "ValueError", "error XYZ")
68 except ValueError as e:
69 assert e.__tvm_ffi_error__.kind == "ValueError" # ty: ignore[unresolved-attribute]
70 assert e.__tvm_ffi_error__.message == "error XYZ" # ty: ignore[unresolved-attribute]
71 assert e.__tvm_ffi_error__.backtrace.find("TestRaiseError") != -1 # ty: ignore[unresolved-attribute]
72 record_object.append(e.__tvm_ffi_error__) # ty: ignore[unresolved-attribute]
73 raise e
74
75 try:
76 cxx_test_apply(raise_error)

Callers 1

Calls 3

fapplyFunction · 0.85
appendMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected