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

Implement better error handling #18

Merged
merged 1 commit into from
Apr 10, 2019

Conversation

wesleywiser
Copy link
Member

// TODO: This is very crude error handling.
// https://github.com/rust-lang/measureme/issues/9
fs::create_dir_all(path.parent().unwrap()).unwrap();
fn from_path(path: &Path) -> Result<Self, Box<Error>> {
Copy link
Member Author

Choose a reason for hiding this comment

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

Is Box<Error> ok or should we use a better error type?

Copy link
Member

@michaelwoerister michaelwoerister left a comment

Choose a reason for hiding this comment

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

Great! I think Error is a good choice here.

@michaelwoerister michaelwoerister merged commit 5ca1388 into rust-lang:master Apr 10, 2019
@wesleywiser wesleywiser deleted the error_handling branch April 10, 2019 10:42
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