Skip to content

Commit bb05edf

Browse files
committed
Removed error message when a deserializzation error occurs in Artifact
1 parent b7b3de6 commit bb05edf

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

lib/compiler/src/engine/artifact.rs

+8-10
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,12 @@ impl Artifact {
158158
Ok(v) => {
159159
return Ok(v);
160160
}
161-
Err(err) => {
162-
eprintln!("Could not deserialize as static object: {}", err);
161+
Err(_) => {
162+
return Err(DeserializeError::Incompatible(
163+
"The provided bytes are not wasmer-universal".to_string(),
164+
));
163165
}
164166
}
165-
return Err(DeserializeError::Incompatible(
166-
"The provided bytes are not wasmer-universal".to_string(),
167-
));
168167
}
169168

170169
let bytes = Self::get_byte_slice(bytes, ArtifactBuild::MAGIC_HEADER.len(), bytes.len())?;
@@ -198,13 +197,12 @@ impl Artifact {
198197
Ok(v) => {
199198
return Ok(v);
200199
}
201-
Err(err) => {
202-
eprintln!("Could not deserialize as static object: {}", err);
200+
Err(_) => {
201+
return Err(DeserializeError::Incompatible(
202+
"The provided bytes are not wasmer-universal".to_string(),
203+
));
203204
}
204205
}
205-
return Err(DeserializeError::Incompatible(
206-
"The provided bytes are not wasmer-universal".to_string(),
207-
));
208206
}
209207

210208
let bytes = Self::get_byte_slice(bytes, ArtifactBuild::MAGIC_HEADER.len(), bytes.len())?;

0 commit comments

Comments
 (0)