Lines Matching refs:error

17 static void exit_with_error(const char *message, wasmtime_error_t *error,
55 wasmtime_error_t *error = wasmtime_wat2wasm(wat.data, wat.size, &wasm); in main() local
56 if (error != NULL) in main()
57 exit_with_error("failed to parse wat", error, NULL); in main()
63 error = wasmtime_module_new(engine, (uint8_t *)wasm.data, wasm.size, &module); in main()
65 if (error != NULL) in main()
66 exit_with_error("failed to compile module", error, NULL); in main()
72 error = wasmtime_instance_new(context, module, NULL, 0, &instance, &trap); in main()
73 if (error != NULL || trap != NULL) in main()
74 exit_with_error("failed to instantiate", error, trap); in main()
104 error = wasmtime_table_set(context, &item.of.table, 3, &externref_val); in main()
105 if (error != NULL) in main()
106 exit_with_error("failed to set table", error, NULL); in main()
128 error = wasmtime_global_set(context, &item.of.global, &externref_val); in main()
129 if (error != NULL) in main()
130 exit_with_error("failed to set global", error, NULL); in main()
153 error = wasmtime_func_call(context, &item.of.func, &externref_val, 1, in main()
155 if (error != NULL || trap != NULL) in main()
156 exit_with_error("failed to call function", error, trap); in main()
182 static void exit_with_error(const char *message, wasmtime_error_t *error, in exit_with_error() argument
186 if (error != NULL) { in exit_with_error()
187 wasmtime_error_message(error, &error_message); in exit_with_error()
188 wasmtime_error_delete(error); in exit_with_error()