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

Function ExampleErrorHandling

tests/cpp/test_example.cc:107–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107void ExampleErrorHandling() {
108 namespace ffi = tvm::ffi;
109 try {
110 FuncThrowError();
111 } catch (const ffi::Error& e) {
112 EXPECT_EQ(e.kind(), "TypeError");
113 EXPECT_EQ(e.message(), "test0");
114 std::cout << e.TracebackMostRecentCallLast() << std::endl;
115 }
116}
117
118TEST(Example, Function) {
119 ExampleFunctionFromPacked();

Callers 1

TESTFunction · 0.85

Calls 4

FuncThrowErrorFunction · 0.85
kindMethod · 0.45
messageMethod · 0.45

Tested by

no test coverage detected