MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / init

Method init

src/core/impl/exception.cpp:26–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24} // namespace
25
26void MegBrainError::init() {
27 m_msg.append("\n");
28#if MGB_ENABLE_DEBUG_UTIL
29 debug::backtrace(2).fmt_to_str(m_msg);
30 static bool print_exc = MGB_GETENV("MGB_PRINT_EXC");
31 if (print_exc) {
32 fprintf(stderr, "mgb: exception occurred: %s\n", m_msg.c_str());
33 }
34#endif
35}
36
37CudaError::CudaError(const std::string& msg) : SystemError(msg) {
38 m_msg.append(get_cuda_extra_info());

Callers 2

MegDNNHandleMethod · 0.45

Calls 2

fmt_to_strMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected