Kathryn-cat commented on code in PR #399:
URL: https://github.com/apache/tvm-ffi/pull/399#discussion_r2728927201
##########
include/tvm/ffi/function_details.h:
##########
@@ -219,6 +237,14 @@ TVM_FFI_INLINE void
unpack_call(std::index_sequence<Is...>, const std::string* o
// use index sequence to do recursive-less unpacking
if constexpr (std::is_same_v<R, void>) {
f(ArgValueWithContext<std::tuple_element_t<Is, PackedArgs>>{args, Is,
optional_name, f_sig}...);
+ } else if constexpr (is_expected_v<R>) {
Review Comment:
i think the current design unwraps `Expected<T>` and throws error at the FFI
boundary. `CallExpected` use safe_call to catch the error and return
`Expected<T>`; on the contrary, the normal call path would throw an error. This
will keep a standard exception model for all callers.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]