Add a CtonError::InvalidInput variant.

This error code will be used to complain when a WebAssembly binary code
can't be parsed.
This commit is contained in:
Jakob Stoklund Olesen
2017-09-01 13:06:05 -07:00
parent 8237893113
commit 52cbbcd069
2 changed files with 11 additions and 0 deletions

View File

@@ -195,6 +195,7 @@ fn handle_module(
CtonError::Verifier(err) => {
return Err(pretty_verifier_error(&context.func, None, err));
}
CtonError::InvalidInput |
CtonError::ImplLimitExceeded |
CtonError::CodeTooLarge => return Err(String::from(error.description())),
}
@@ -207,6 +208,7 @@ fn handle_module(
CtonError::Verifier(err) => {
return Err(pretty_verifier_error(&context.func, None, err));
}
CtonError::InvalidInput |
CtonError::ImplLimitExceeded |
CtonError::CodeTooLarge => return Err(String::from(error.description())),
}