avantgardnerio commented on code in PR #2885:
URL: https://github.com/apache/arrow-datafusion/pull/2885#discussion_r925844450
##########
datafusion/common/src/error.rs:
##########
@@ -83,6 +83,30 @@ pub enum DataFusionError {
#[cfg(feature = "jit")]
/// Error occurs during code generation
JITError(ModuleError),
+ /// Error with context
+ Context(String, Box<DataFusionError>),
+}
+
+#[macro_export]
+macro_rules! context {
+ ($desc:expr, $err:expr) => {
+ datafusion_common::DataFusionError::Context(
+ format!("{} at {}:{}", $desc, file!(), line!()),
+ Box::new($err),
+ )
+ };
+}
+
+#[macro_export]
+macro_rules! plan_err {
Review Comment:
Thanks! Think we should add file and line? or leave as it is?
--
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]