Struct EnvErrorAlreadySet#

Inheritance Relationships#

Base Type#

  • public std::exception

Struct Documentation#

struct EnvErrorAlreadySet : public std::exception#

Error already set in frontend env.

This error can be thrown by EnvCheckSignals to indicate that there is an error set in the frontend environment(e.g. python interpreter). The TVM FFI should catch this error and return a proper code to tell the frontend caller about this fact.

void ExampleLongRunningFunction() {
  if (TVMFFIEnvCheckSignals() != 0) {
    throw ::tvm::ffi::EnvErrorAlreadySet();
  }
  // do work here
}