xushiyan commented on code in PR #124:
URL: https://github.com/apache/hudi-rs/pull/124#discussion_r1870481178


##########
crates/core/src/lib.rs:
##########
@@ -48,3 +48,49 @@ pub mod file_group;
 pub mod storage;
 pub mod table;
 pub mod util;
+
+use thiserror::Error;
+
+#[derive(Error, Debug)]
+pub enum Error {
+    #[error("Config '{0}' not found")]
+    ConfNotFound(String),
+
+    #[error("Invalid config item '{item}', {source:?}")]
+    InvalidConf {
+        item: &'static str,
+        source: Box<dyn std::error::Error + Sync + Send + 'static>,
+    },
+
+    #[error("Parse url '{url}' failed, {source}")]
+    UrlParse {
+        url: String,
+        source: url::ParseError,
+    },
+
+    #[error("Invalid file path '{name}', {detail}")]
+    InvalidPath { name: String, detail: String },
+
+    #[error("{0}")]
+    Unsupported(String),
+
+    #[error("{0}")]

Review Comment:
   this will be overwritten in a follow up.



##########
crates/core/src/lib.rs:
##########
@@ -48,3 +48,49 @@ pub mod file_group;
 pub mod storage;
 pub mod table;
 pub mod util;
+
+use thiserror::Error;
+
+#[derive(Error, Debug)]
+pub enum Error {
+    #[error("Config '{0}' not found")]
+    ConfNotFound(String),
+
+    #[error("Invalid config item '{item}', {source:?}")]
+    InvalidConf {
+        item: &'static str,
+        source: Box<dyn std::error::Error + Sync + Send + 'static>,
+    },
+
+    #[error("Parse url '{url}' failed, {source}")]
+    UrlParse {
+        url: String,
+        source: url::ParseError,
+    },
+
+    #[error("Invalid file path '{name}', {detail}")]
+    InvalidPath { name: String, detail: String },
+
+    #[error("{0}")]

Review Comment:
   this will be overwritten in a follow up.



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

Reply via email to