MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / WasmEdge_ResultGetMessage

Function WasmEdge_ResultGetMessage

lib/api/wasmedge.cpp:887–895  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

885}
886
887WASMEDGE_CAPI_EXPORT const char *
888WasmEdge_ResultGetMessage(const WasmEdge_Result Res) noexcept {
889 if (WasmEdge_ResultGetCategory(Res) != WasmEdge_ErrCategory_WASM) {
890 return WasmEdge::ErrCodeStr[WasmEdge::ErrCode::Value::UserDefError].data();
891 }
892 return WasmEdge::ErrCodeStr[static_cast<WasmEdge::ErrCode::Value>(
893 WasmEdge_ResultGetCode(Res))]
894 .data();
895}
896
897// <<<<<<<< WasmEdge result functions <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
898

Callers 6

_TryFunction · 0.85
TESTFunction · 0.85
run_fib_wasmFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 2

WasmEdge_ResultGetCodeFunction · 0.85
dataMethod · 0.45

Tested by 2

_TryFunction · 0.68
TESTFunction · 0.68