Lines Matching refs:error

17 static void exit_with_error(const char *message, wasmtime_error_t *error,
31 wasmtime_error_t *error = in check_call() local
33 if (error != NULL || trap != NULL) in check_call()
34 exit_with_error("failed to call function", error, trap); in check_call()
67 wasmtime_error_t *error = in check_ok() local
69 if (error != NULL || trap != NULL) in check_ok()
70 exit_with_error("failed to call function", error, trap); in check_ok()
88 wasmtime_error_t *error = in check_trap() local
90 if (error != NULL) in check_trap()
91 exit_with_error("failed to call function", error, NULL); in check_trap()
150 wasmtime_error_t *error = wasmtime_wat2wasm(wat.data, wat.size, &binary); in main() local
151 if (error != NULL) in main()
152 exit_with_error("failed to parse wat", error, NULL); in main()
158 error = in main()
160 if (error) in main()
161 exit_with_error("failed to compile module", error, NULL); in main()
168 error = wasmtime_instance_new(context, module, NULL, 0, &instance, &trap); in main()
169 if (error != NULL || trap != NULL) in main()
170 exit_with_error("failed to instantiate", error, trap); in main()
271 error = wasmtime_memory_grow(context, &memory0, 1, &old_size); in main()
272 if (error != NULL) in main()
273 exit_with_error("failed to grow memory", error, trap); in main()
282 error = wasmtime_memory_grow(context, &memory0, 1, &old_size); in main()
283 assert(error != NULL); in main()
284 wasmtime_error_delete(error); in main()
285 error = wasmtime_memory_grow(context, &memory0, 0, &old_size); in main()
286 if (error != NULL) in main()
287 exit_with_error("failed to grow memory", error, trap); in main()
289 error = wasmtime_memory_grow(context, &memory1, 2, &old_size); in main()
290 if (error != NULL) in main()
291 exit_with_error("failed to grow memory", error, trap); in main()
300 error = wasmtime_memory_grow(context, &memory1, 1, &old_size); in main()
301 assert(error != NULL); in main()
302 wasmtime_error_delete(error); in main()
303 error = wasmtime_memory_grow(context, &memory1, 0, &old_size); in main()
304 if (error != NULL) in main()
305 exit_with_error("failed to grow memory", error, trap); in main()
317 static void exit_with_error(const char *message, wasmtime_error_t *error, in exit_with_error() argument
321 if (error != NULL) { in exit_with_error()
322 wasmtime_error_message(error, &error_message); in exit_with_error()
323 wasmtime_error_delete(error); in exit_with_error()