Lines Matching refs:error
17 static void exit_with_error(const char *message, wasmtime_error_t *error,
58 wasmtime_error_t *error = wasmtime_wat2wasm(wat.data, wat.size, &wasm); in serialize() local
59 if (error != NULL) in serialize()
60 exit_with_error("failed to parse wat", error, NULL); in serialize()
67 error = wasmtime_module_new(engine, (uint8_t *)wasm.data, wasm.size, &module); in serialize()
69 if (error != NULL) in serialize()
70 exit_with_error("failed to compile module", error, NULL); in serialize()
71 error = wasmtime_module_serialize(module, buffer); in serialize()
73 if (error != NULL) in serialize()
74 exit_with_error("failed to serialize module", error, NULL); in serialize()
99 wasmtime_error_t *error = wasmtime_module_deserialize( in deserialize() local
101 if (error != NULL) in deserialize()
102 exit_with_error("failed to compile module", error, NULL); in deserialize()
123 error = wasmtime_instance_new(context, module, imports, 1, &instance, &trap); in deserialize()
124 if (error != NULL || trap != NULL) in deserialize()
125 exit_with_error("failed to instantiate", error, trap); in deserialize()
136 error = wasmtime_func_call(context, &run.of.func, NULL, 0, NULL, 0, &trap); in deserialize()
137 if (error != NULL || trap != NULL) in deserialize()
138 exit_with_error("failed to call function", error, trap); in deserialize()
160 static void exit_with_error(const char *message, wasmtime_error_t *error, in exit_with_error() argument
164 if (error != NULL) { in exit_with_error()
165 wasmtime_error_message(error, &error_message); in exit_with_error()
166 wasmtime_error_delete(error); in exit_with_error()