Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mitsuhiko/rust-eh
More error handling experiments in Rust.
https://github.com/mitsuhiko/rust-eh
Last synced: 3 months ago
JSON representation
More error handling experiments in Rust.
- Host: GitHub
- URL: https://github.com/mitsuhiko/rust-eh
- Owner: mitsuhiko
- Created: 2014-11-17T09:53:05.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-11-18T22:23:41.000Z (about 10 years ago)
- Last Synced: 2024-05-08T21:52:56.428Z (8 months ago)
- Language: Rust
- Size: 176 KB
- Stars: 17
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```