marcosschroh commented on code in PR #2587:
URL: https://github.com/apache/avro/pull/2587#discussion_r1395600446
##########
lang/rust/avro/src/error.rs:
##########
@@ -478,6 +478,9 @@ pub enum Error {
#[error("Invalid Avro data! Cannot read codec type from value that is not
Value::Bytes.")]
BadCodecMetadata,
+
+ #[error("Schemas are not compatible. '{0}'")]
+ CompatibilityError(String),
Review Comment:
Interesting. I am not a rust expert but it seems a good idea. Is the idea
that end users could `match` for specific `error` and then have logic for it ?
Something like:
```rust
Err(e) => match e.kind() {
WrongKind => break,
MissingSymbols => do_something(),
_ => panic!("Can't read schema"),
},
```
--
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]