Lines Matching refs:error
16 static void exit_with_error(const char *message, wasmtime_error_t *error,
20 wasmtime_error_t *error = NULL; in main() local
34 error = wasmtime_context_set_fuel(context, 10000); in main()
35 if (error != NULL) in main()
36 exit_with_error("failed to set fuel", error, NULL); in main()
57 error = wasmtime_wat2wasm(wat.data, wat.size, &wasm); in main()
58 if (error != NULL) in main()
59 exit_with_error("failed to parse wat", error, NULL); in main()
64 error = wasmtime_module_new(engine, (uint8_t *)wasm.data, wasm.size, &module); in main()
66 exit_with_error("failed to compile module", error, NULL); in main()
71 error = wasmtime_instance_new(context, module, NULL, 0, &instance, &trap); in main()
72 if (error != NULL || trap != NULL) in main()
73 exit_with_error("failed to instantiate", error, trap); in main()
90 error = in main()
92 if (error != NULL || trap != NULL) { in main()
99 if (error != NULL) in main()
100 wasmtime_error_delete(error); in main()
111 error = wasmtime_context_set_fuel(context, 10000); in main()
112 if (error != NULL) in main()
113 exit_with_error("failed to set fuel", error, NULL); in main()
123 static void exit_with_error(const char *message, wasmtime_error_t *error, in exit_with_error() argument
127 if (error != NULL) { in exit_with_error()
128 wasmtime_error_message(error, &error_message); in exit_with_error()