chaokunyang commented on code in PR #2765:
URL: https://github.com/apache/fory/pull/2765#discussion_r2429818318
##########
rust/fory-core/src/error.rs:
##########
@@ -15,38 +15,98 @@
// specific language governing permissions and limitations
// under the License.
+use std::borrow::Cow;
+use std::io;
+
use thiserror::Error;
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum Error {
- #[error("Fory on Rust not support Ref type")]
- Ref,
+ #[error("Type mismatch: type_a = {0}, type_b = {1}")]
+ TypeMismatch(u32, u32),
+
+ #[error("Buffer out of bound: {0} + {1} > {2}")]
+ BufferOutOfBound(usize, usize, usize),
+
+ #[error("IO error: {0}")]
+ Io(#[from] io::Error),
Review Comment:
should be IoError instead of `Io`. The principle is that if the name ifselt
can't express the error, you should ass `Error` as suffix instead
--
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]