some validation in packing

This commit is contained in:
NikVolf
2017-11-22 01:40:58 +03:00
parent a08b9e7dff
commit 89867d7ddb
2 changed files with 40 additions and 7 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ fn main() {
if !matches.is_present("skip_optimization") {
wasm_utils::optimize(&mut ctor_module, vec![CREATE_SYMBOL]).expect("Optimizer to finish without errors");
}
let ctor_module = wasm_utils::pack_instance(raw_module, ctor_module);
let ctor_module = wasm_utils::pack_instance(raw_module, ctor_module).expect("Packing failed");
parity_wasm::serialize_to_file(&path, ctor_module).expect("Failed to serialize to file");
} else {
let mut file = fs::File::create(&path).expect("Failed to create file");