Lines Matching refs:error
32 static void exit_with_error(const char *message, wasmtime_error_t *error,
45 wasmtime_error_t *error = wasmtime_linker_define_wasi(linker); in main() local
46 if (error != NULL) in main()
47 exit_with_error("failed to link wasi", error, NULL); in main()
68 error = wasmtime_module_new(engine, (uint8_t *)wasm.data, wasm.size, &module); in main()
70 exit_with_error("failed to compile module", error, NULL); in main()
82 error = wasmtime_context_set_wasi(context, wasi_config); in main()
83 if (error != NULL) in main()
84 exit_with_error("failed to instantiate WASI", error, NULL); in main()
87 error = wasmtime_linker_module(linker, context, "", 0, module); in main()
88 if (error != NULL) in main()
89 exit_with_error("failed to instantiate module", error, NULL); in main()
93 error = wasmtime_linker_get_default(linker, context, "", 0, &func); in main()
94 if (error != NULL) in main()
95 exit_with_error("failed to locate default export for module", error, NULL); in main()
97 error = wasmtime_func_call(context, &func, NULL, 0, NULL, 0, &trap); in main()
98 if (error != NULL || trap != NULL) in main()
99 exit_with_error("error calling default export", error, trap); in main()
109 static void exit_with_error(const char *message, wasmtime_error_t *error, in exit_with_error() argument
113 if (error != NULL) { in exit_with_error()
114 wasmtime_error_message(error, &error_message); in exit_with_error()
115 wasmtime_error_delete(error); in exit_with_error()