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

Function CatchRegistryError

oneflow/core/common/registry_error.cpp:35–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void CatchRegistryError(const std::function<Maybe<void>()>& handler) {
36 const auto& maybe_error = TRY(handler());
37 if (!maybe_error.IsOk()) {
38 if (!*MutRegistryError()) { *MutRegistryError() = maybe_error.stacked_error(); }
39 }
40}
41
42} // namespace oneflow

Callers 2

UserOpRegisterTriggerMethod · 0.85
RegisterBoxingFunctionFunction · 0.85

Calls 4

handlerFunction · 0.85
MutRegistryErrorFunction · 0.85
IsOkMethod · 0.45
stacked_errorMethod · 0.45

Tested by

no test coverage detected