chaokunyang commented on code in PR #2765:
URL: https://github.com/apache/fory/pull/2765#discussion_r2429577865
##########
rust/fory-core/src/meta/meta_string.rs:
##########
@@ -260,14 +258,12 @@ impl MetaStringEncoder {
}
ensure!(
input.len() < SHORT_MAX_VALUE,
- anyhow!(
- "Meta string is too long, max:{SHORT_MAX_VALUE}, current:{}",
- input.len()
- )
+ "Meta string is too long, max:{SHORT_MAX_VALUE}, current:{}",
+ input.len()
);
ensure!(
encoding == Encoding::Utf8 || self.is_latin(input),
- anyhow!("Non-ASCII characters in meta string are not allowed")
+ Error::msg("Non-ASCII characters in meta string are not allowed")
Review Comment:
ditto, return `EncodeError`
##########
rust/fory-core/src/meta/meta_string.rs:
##########
@@ -429,8 +425,8 @@ impl MetaStringEncoder {
} else if c == self.special_char2 {
Ok(63)
} else {
- Err(anyhow!(
- "Invalid character value for LOWER_SPECIAL
decoding: {c:?}"
+ Err(Error::msg(
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]