chaokunyang commented on code in PR #2765:
URL: https://github.com/apache/fory/pull/2765#discussion_r2429584112


##########
rust/fory-core/src/fory.rs:
##########
@@ -312,27 +311,27 @@ impl Fory {
 
     fn read_head(&self, reader: &mut Reader) -> Result<bool, Error> {
         if self.xlang {
-            let magic_numer = reader.read_u16();
+            let magic_numer = reader.read_u16()?;
             ensure!(
                 magic_numer == MAGIC_NUMBER,
-                anyhow!(
+                Error::msg(format!(

Review Comment:
   return `InvalidData` error



-- 
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]

Reply via email to