Function tvm::transform::EnrichErrorWithContext#
Defined in File transform.h
Function Documentation#
-
ffi::Error tvm::transform::EnrichErrorWithContext(const ffi::Error &err, const ffi::ObjectRef &root, ffi::String context = "")#
Append an underlined TVMScript location from an error’s visit context.
Preserve the original error kind, message, and backtrace. Return the original error if the context cannot be resolved or printed. A rendered error drops its visit context so outer handlers do not append the location again.
- Parameters:
err – The original error.
root – The IR root containing the visited nodes.
context – Optional operation description preceding the location.
- Returns:
The enriched error, or the original error on fallback.