Skip to content
More error handling experiments in Rust.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src
.gitignore
Cargo.toml
README.md

README.md

rust-eh

This is an error handling experiment. Primarily it tries to bring the debuggability of Python tracebacks to Rust results.

Current status:

Traceback (most recent cause last):
  File "/Users/mitsuhiko/Development/rust-eh/examples/test.rs", line 42
    fail!(FileNotFound { file: Some(Path::new("/missing.txt")) });
  File "/Users/mitsuhiko/Development/rust-eh/examples/test.rs", line 46
    try!(test());
File not found: Failed to locate file (file=/missing.txt)

The above error resulted in another:

Traceback (most recent cause last):
  File "/Users/mitsuhiko/Development/rust-eh/examples/test.rs", line 52
    Err(err) => fail!(RecordNotFound, "could not find record", err),
Record not found: could not find record
You can’t perform that action at this time.