Class Error#
Defined in File error.h
Inheritance Relationships#
Base Types#
public tvm::ffi::ObjectRef
(Class ObjectRef)public std::exception
Class Documentation#
-
class Error : public tvm::ffi::ObjectRef, public std::exception#
Managed reference to ErrorObj.
Public Functions
-
inline Error(std::string kind, std::string message, std::string backtrace)#
Constructor.
- Parameters:
kind – The kind of the error.
message – The message of the error.
backtrace – The backtrace of the error.
-
inline Error(std::string kind, std::string message, const TVMFFIByteArray *backtrace)#
Constructor.
- Parameters:
kind – The kind of the error.
message – The message of the error.
backtrace – The backtrace of the error.
-
inline std::string kind() const#
Get the kind of the error object.
- Returns:
The kind of the error object.
-
inline std::string message() const#
Get the message of the error object.
- Returns:
The message of the error object.
-
inline std::string backtrace() const#
Get the backtrace of the error object.
See also
Note
Consider use TracebackMostRecentCallLast for pythonic style traceback.
- Returns:
The backtrace of the error object.
-
inline std::string TracebackMostRecentCallLast() const#
Get the traceback in the order of most recent call last.
- Returns:
The traceback of the error object.
-
inline void UpdateBacktrace(const TVMFFIByteArray *backtrace_str, int32_t update_mode)#
Update the backtrace of the error object.
- Parameters:
backtrace_str – The backtrace to update.
update_mode – The mode to update the backtrace, can be either kTVMFFIBacktraceUpdateModeReplace, kTVMFFIBacktraceUpdateModeAppend.
-
inline const char *what() const noexcept(true) override#
Get the error message.
- Returns:
The error message
-
inline Error(std::string kind, std::string message, std::string backtrace)#