tisonkun commented on code in PR #47:
URL: https://github.com/apache/datasketches-rust/pull/47#discussion_r2650113234


##########
datasketches/src/error.rs:
##########
@@ -19,31 +19,197 @@
 
 use std::fmt;
 
-/// Errors that can occur during sketch serialization or deserialization
-#[derive(Debug, Clone)]
-pub enum SerdeError {
-    /// Insufficient data in buffer
-    InsufficientData(String),
-    /// Invalid sketch family identifier
-    InvalidFamily(String),
-    /// Unsupported serialization version
-    UnsupportedVersion(String),
-    /// Invalid parameter value
-    InvalidParameter(String),
-    /// Malformed or corrupt sketch data
-    MalformedData(String),
-}
-
-impl fmt::Display for SerdeError {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+/// ErrorKind is all kinds of Error of datasketches.
+#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
+#[non_exhaustive]
+pub enum ErrorKind {
+    /// The argument provided is invalid.
+    InvalidArgument,
+    /// The sketch data deserializing is malformed.
+    MalformedDeserializeData,

Review Comment:
   I'd prefer a better short name but fail to find one.



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