| 885 | } |
| 886 | |
| 887 | WASMEDGE_CAPI_EXPORT const char * |
| 888 | WasmEdge_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 |