matthewmturner commented on issue #1540:
URL:
https://github.com/apache/arrow-datafusion/issues/1540#issuecomment-1010690834
I was playing with `From<Box<dyn Error>> for DataFusionError` before but
having issues with it. I think if i'm understanding correctly the approach we
could do, as @houqp mentioned, would be something like the following:
```
pub enum DataFusionError {
/// Error returned by arrow.
ArrowError(ArrowError),
...
/// Errors originating from outside DataFusion's core codebase.
/// For example, a custom S3Error from the crate
datafusion-objectstore-s3
ExternalError(Box<dyn Error + Send + Sync>),
}
impl From<Box<dyn Error>> for DataFusionError {
fn from(err: Box<dyn Error>) -> Self {
DataFusionError::External(err)
}
```
Is this what you guys had in mind?
--
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]