MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / RecordError

Method RecordError

tests/runtime/results/leaf.cpp:29–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29std::expected<float, test_exports::E2> test_exports::RecordError(float a) {
30 if (a==0.0) {
31 return std::unexpected(test_exports::E2{420, 0});
32 }
33 else if (a==1.0) {
34 return std::unexpected(test_exports::E2{77, 2});
35 }
36 else {
37 return a;
38 }
39}
40
41std::expected<float, test_exports::E3> test_exports::VariantError(float a) {
42 if (a==0.0) {

Callers 2

RecordErrorFunction · 0.45
RunFunction · 0.45

Calls 1

unexpectedClass · 0.85

Tested by

no test coverage detected