Lines Matching refs:error
17 static void exit_with_error(const char *message, wasmtime_error_t *error,
57 wasmtime_error_t *error = wasmtime_wat2wasm(wat.data, wat.size, &wasm); in main() local
58 if (error != NULL) in main()
59 exit_with_error("failed to parse wat", error, NULL); in main()
65 error = wasmtime_module_new(engine, (uint8_t *)wasm.data, wasm.size, &module); in main()
67 if (error != NULL) in main()
68 exit_with_error("failed to compile module", error, NULL); in main()
74 error = wasmtime_instance_new(context, module, NULL, 0, &instance, &trap); in main()
75 if (error != NULL || trap != NULL) in main()
76 exit_with_error("failed to instantiate", error, trap); in main()
106 error = wasmtime_table_set(context, &item.of.table, 3, &anyref_val); in main()
107 if (error != NULL) in main()
108 exit_with_error("failed to set table", error, NULL); in main()
131 error = wasmtime_global_set(context, &item.of.global, &anyref_val); in main()
132 if (error != NULL) in main()
133 exit_with_error("failed to set global", error, NULL); in main()
155 error = wasmtime_func_call(context, &item.of.func, &anyref_val, 1, NULL, 0, in main()
157 if (error != NULL || trap != NULL) in main()
158 exit_with_error("failed to call function", error, trap); in main()
170 error = in main()
172 if (error != NULL || trap != NULL) in main()
173 exit_with_error("failed to call function", error, trap); in main()
199 static void exit_with_error(const char *message, wasmtime_error_t *error, in exit_with_error() argument
203 if (error != NULL) { in exit_with_error()
204 wasmtime_error_message(error, &error_message); in exit_with_error()
205 wasmtime_error_delete(error); in exit_with_error()