MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / GetErrorString

Function GetErrorString

oneflow/core/common/error.cpp:365–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363}
364
365std::string GetErrorString(const std::shared_ptr<StackedError>& error) {
366 std::string error_str;
367 if (IsInDebugMode()) {
368 error_str = GetStackedErrorString(error);
369 } else {
370 error_str = error->error_proto()->msg();
371 }
372 if (error_str.empty()) { error_str = "<No error message>"; }
373 return error_str;
374}
375
376void ThrowError(const std::shared_ptr<StackedError>& error) {
377 std::string error_str;

Callers 1

ThrowErrorFunction · 0.85

Calls 3

IsInDebugModeFunction · 0.85
GetStackedErrorStringFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected