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

Use error-chain to define Ekiden errors #161

Closed
kostko opened this issue Apr 26, 2018 · 5 comments
Closed

Use error-chain to define Ekiden errors #161

kostko opened this issue Apr 26, 2018 · 5 comments
Labels
c:common Category: common libraries p:2 Priority: desired feature

Comments

@kostko
Copy link
Member

kostko commented Apr 26, 2018

We should use the error-chain crate to define our errors in ekiden-common instead of the manual error classes we have now as this seems to be the idiomatic way to do errors in Rust. I already used it to define errors for ekiden-tools in #160 and it seems really nice.

@kostko kostko added p:3 Priority: nice to have s:good first issue Status: good for newcomers labels Apr 26, 2018
@nhynes
Copy link
Contributor

nhynes commented May 15, 2018

just FYI, you'll need to use error-chain = { ..., default-features = false } so that it doesn't try to pull down backtrace and compile backtrace-sys. There's likely a way to get this to use the rust-sgx-sdk backtrace but I haven't looked into this yet.

@nhynes nhynes removed the s:good first issue Status: good for newcomers label May 16, 2018
@nhynes
Copy link
Contributor

nhynes commented May 16, 2018

This is also not a good first issue ;) Turns out that PoisonError is unlinkable since it holds a MutexGuard<'_, ...>.

@kostko
Copy link
Member Author

kostko commented May 16, 2018

Oops :-)

@kostko
Copy link
Member Author

kostko commented Dec 30, 2018

We should likely use something like the failure crate, but maybe we should wait until 0.2 which will just extend the improved Error trait from the standard library (Rust RFC 2504).

Also see rust-lang-deprecated/failure#287.

@kostko kostko added p:2 Priority: desired feature c:common Category: common libraries and removed p:3 Priority: nice to have labels Feb 4, 2019
@kostko
Copy link
Member Author

kostko commented Aug 12, 2019

This was done in #1531 (failure is now used everywhere).

@kostko kostko closed this as completed Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:common Category: common libraries p:2 Priority: desired feature
Projects
None yet
Development

No branches or pull requests

2 participants