Class MegBrainError

Nested Relationships

Inheritance Relationships

Base Type

  • public exception

Derived Types

Class Documentation

class mgb::MegBrainError : public exception

the most general MegBrain exception type; also base class for all megbrain exceptions

Subclassed by mgb::AssertionError, mgb::ConversionError, mgb::InternalError, mgb::MegDNNError, mgb::NumRangeCheckerError, mgb::SerializationError, mgb::SystemError, mgb::TensorCopyOverlapError, mgb::TensorReshapeError, mgb::TimeoutError, mgb::VarSanityCheckError

Public Functions

MegBrainError(const std::string &msg)
const char *what() const noexcept override
const ExtraInfo *extra_info() const

get associated extra info, or nullptr

template<typename T>
MegBrainError &extra_info(T &&ptr)

set extra info

~MegBrainError() noexcept = default

Protected Attributes

std::string m_msg
class ExtraInfo

base class for extra information to be associated with an exception

Public Functions

~ExtraInfo() = default