Skip to content

Ndarray with Failure - #644

Closed
rochamatcomp wants to merge 11 commits into
rust-ndarray:masterfrom
rochamatcomp:master
Closed

rochamatcomp wants to merge 11 commits into
rust-ndarray:masterfrom
rochamatcomp:master

Conversation

@rochamatcomp

Copy link
Copy Markdown

Ndarray with Failure. Added detailed error messages #449.

@jturner314

Copy link
Copy Markdown
Member

I hate to reject this outright because it looks like you've put a lot of work into it, but I'm strongly opposed to replacing Error with Fail for a few reasons:

  1. failure is "experimental" and "currently evolving", so while it may be fine for an end-user application, I don't think we should use it for a library like ndarray.
  2. The standard library's Error is being updated based on the failure experiment to resolve most of the issues with the old version of Error. (RFC 2504) In stable, the .source() method has been added, .cause() is deprecated, and .description() is "soft-deprecated".
  3. It's annoying to have to call .compat() to get something that implements Error.

What is your root objective of this PR? (There are lots of places for improvement in ndarray's error handling. Is your objective primarily to add more detail to the errors? If so, we can do so while continuing to use the standard library's Error trait.)

@rochamatcomp

Copy link
Copy Markdown
Author

OK, it was good to know more about shape errors.

My objective is to add more detail to the errors indeed. How do you think we can do this with the standard library's Error trait?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants