Define TVM_FFI_UNEXPECTED

Define TVM_FFI_UNEXPECTED#

Define Documentation#

TVM_FFI_UNEXPECTED(ErrorKind)#

Build a streamed error for an Unexpected or Expected return value.

Records file, line, and function without walking the stack. The caller writes the return; the builder’s streaming and conversions are rvalue-only. Allocations and user-defined streaming may still throw.

Expected<int> Fail() {
  return TVM_FFI_UNEXPECTED(ValueError) << "invalid input";
}