Skip to content

Commit f03b8fe

Browse files
uintwebmaster128
andauthored
Better error message for obsolete MessageTooLong return code
Co-authored-by: Simon Warta <[email protected]>
1 parent 0497f9f commit f03b8fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/std/src/imports.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ impl Api for ExternalApi {
279279
match result {
280280
0 => Ok(true),
281281
1 => Ok(false),
282-
2 => panic!("MessageTooLong must not happen. This is a bug in the VM."),
282+
2 => panic!("Error code 2 unused since CosmWasm 0.15. This is a bug in the VM."),
283283
3 => panic!("InvalidHashFormat must not happen. This is a bug in the VM."),
284284
4 => Err(VerificationError::InvalidSignatureFormat),
285285
5 => Err(VerificationError::InvalidPubkeyFormat),
@@ -311,7 +311,7 @@ impl Api for ExternalApi {
311311
match result {
312312
0 => Ok(true),
313313
1 => Ok(false),
314-
2 => panic!("MessageTooLong must not happen. This is a bug in the VM."),
314+
2 => panic!("Error code 2 unused since CosmWasm 0.15. This is a bug in the VM."),
315315
3 => panic!("InvalidHashFormat must not happen. This is a bug in the VM."),
316316
4 => Err(VerificationError::InvalidSignatureFormat),
317317
5 => Err(VerificationError::InvalidPubkeyFormat),

0 commit comments

Comments
 (0)