MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / unwrap

Function unwrap

examples/linking.cc:8–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6using namespace wasmtime;
7
8template <typename T, typename E> T unwrap(Result<T, E> result) {
9 if (result) {
10 return result.ok();
11 }
12 std::cerr << "error: " << result.err().message() << "\n";
13 std::abort();
14}
15
16std::string readFile(const char *name) {
17 std::ifstream watFile;

Callers

nothing calls this directly

Calls 4

abortFunction · 0.85
okMethod · 0.45
messageMethod · 0.45
errMethod · 0.45

Tested by

no test coverage detected