Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-7312: [Rust] Implement std::error::Error for ArrowError. #5959

Closed
wants to merge 2 commits into from

Conversation

liurenjie1024
Copy link
Contributor

Add this implementation so that others can handle errors from arrow crate better.

@liurenjie1024
Copy link
Contributor Author

@andygrove @nevi-me @sunchao @paddyhoran Please help to review.

@github-actions
Copy link

github-actions bot commented Dec 4, 2019

@@ -70,4 +71,12 @@ impl From<::std::string::FromUtf8Error> for ArrowError {
}
}

impl Display for ArrowError {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "Arrow error happened!")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not display the type of and details ArrowError?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Details should be displayed in debug mode.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't understand, but perhaps it's because I'm not familiar with the Display trait.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I'm with @nevi-me here. His point is that "Arrow error happened!" is not that informative. You would also want to know the variant of the enum and any payload, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

Copy link
Contributor

@paddyhoran paddyhoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @liurenjie1024. I don't see CI failing but I guess we should wait before merging.

@nevi-me
Copy link
Contributor

nevi-me commented Dec 6, 2019

AppVeyor no longer runs any Rust tests, maybe we should remove it from the Rust runs (I haven't checked how it gets triggered though, so maybe that's not possible). Is it possible @kou?

@kou
Copy link
Member

kou commented Dec 6, 2019

Rust job on AppVeyor has been migrated to GitHub Actions based job. So we don't need to wait for AppVeyor result for changes that only affects to Rust.

FYI: We can disable AppVeyor job check for Rust only changes entirely by the following change:

diff --git a/appveyor.yml b/appveyor.yml
index a6d79de7e..cd8617893 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -31,7 +31,6 @@ only_commits:
     - python/
     - r/
     - ruby/
-    - rust/
 
 cache:
   - C:\Users\Appveyor\clcache1

@nevi-me nevi-me closed this in 21a4ffe Dec 6, 2019
nevi-me pushed a commit to nevi-me/arrow that referenced this pull request Dec 7, 2019
Add this implementation so that others can handle errors from arrow crate better.

Closes apache#5959 from liurenjie1024/arrow-7312 and squashes the following commits:

f27683a <Renjie Liu> Fix comment
d3e238d <Renjie Liu> Implement error

Authored-by: Renjie Liu <liurenjie2008@gmail.com>
Signed-off-by: Neville Dipale <nevilledips@gmail.com>
nevi-me pushed a commit to andy-thomason/arrow that referenced this pull request Jan 1, 2020
Add this implementation so that others can handle errors from arrow crate better.

Closes apache#5959 from liurenjie1024/arrow-7312 and squashes the following commits:

f27683a <Renjie Liu> Fix comment
d3e238d <Renjie Liu> Implement error

Authored-by: Renjie Liu <liurenjie2008@gmail.com>
Signed-off-by: Neville Dipale <nevilledips@gmail.com>
nevi-me pushed a commit to andy-thomason/arrow that referenced this pull request Jan 8, 2020
Add this implementation so that others can handle errors from arrow crate better.

Closes apache#5959 from liurenjie1024/arrow-7312 and squashes the following commits:

f27683a <Renjie Liu> Fix comment
d3e238d <Renjie Liu> Implement error

Authored-by: Renjie Liu <liurenjie2008@gmail.com>
Signed-off-by: Neville Dipale <nevilledips@gmail.com>
andy-thomason pushed a commit to andy-thomason/arrow that referenced this pull request Jan 9, 2020
Add this implementation so that others can handle errors from arrow crate better.

Closes apache#5959 from liurenjie1024/arrow-7312 and squashes the following commits:

f27683a <Renjie Liu> Fix comment
d3e238d <Renjie Liu> Implement error

Authored-by: Renjie Liu <liurenjie2008@gmail.com>
Signed-off-by: Neville Dipale <nevilledips@gmail.com>
andy-thomason pushed a commit to andy-thomason/arrow that referenced this pull request Jan 28, 2020
Add this implementation so that others can handle errors from arrow crate better.

Closes apache#5959 from liurenjie1024/arrow-7312 and squashes the following commits:

f27683a <Renjie Liu> Fix comment
d3e238d <Renjie Liu> Implement error

Authored-by: Renjie Liu <liurenjie2008@gmail.com>
Signed-off-by: Neville Dipale <nevilledips@gmail.com>
kszucs pushed a commit to andy-thomason/arrow that referenced this pull request Feb 7, 2020
Add this implementation so that others can handle errors from arrow crate better.

Closes apache#5959 from liurenjie1024/arrow-7312 and squashes the following commits:

f27683a <Renjie Liu> Fix comment
d3e238d <Renjie Liu> Implement error

Authored-by: Renjie Liu <liurenjie2008@gmail.com>
Signed-off-by: Neville Dipale <nevilledips@gmail.com>
andy-thomason pushed a commit to andy-thomason/arrow that referenced this pull request Feb 24, 2020
Add this implementation so that others can handle errors from arrow crate better.

Closes apache#5959 from liurenjie1024/arrow-7312 and squashes the following commits:

f27683a <Renjie Liu> Fix comment
d3e238d <Renjie Liu> Implement error

Authored-by: Renjie Liu <liurenjie2008@gmail.com>
Signed-off-by: Neville Dipale <nevilledips@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants