Lines Matching refs:error
16 static void exit_with_error(const char *message, wasmtime_error_t *error,
65 wasmtime_error_t *error = wasmtime_wat2wasm(wat.data, wat.size, &wasm); in main() local
66 if (error != NULL) in main()
67 exit_with_error("failed to parse wat", error, NULL); in main()
73 error = wasmtime_module_new(engine, (uint8_t *)wasm.data, wasm.size, &module); in main()
75 if (error != NULL) in main()
76 exit_with_error("failed to compile module", error, NULL); in main()
98 error = wasmtime_instance_new(context, module, &import, 1, &instance, &trap); in main()
99 if (error != NULL || trap != NULL) in main()
100 exit_with_error("failed to instantiate", error, trap); in main()
111 error = wasmtime_func_call(context, &run.of.func, NULL, 0, NULL, 0, &trap); in main()
112 if (error != NULL || trap != NULL) in main()
113 exit_with_error("failed to call function", error, trap); in main()
125 static void exit_with_error(const char *message, wasmtime_error_t *error, in exit_with_error() argument
129 if (error != NULL) { in exit_with_error()
130 wasmtime_error_message(error, &error_message); in exit_with_error()
131 wasmtime_error_delete(error); in exit_with_error()