Rust doesn’t have exceptionshttps://github.com/withoutboats/fehler …
-
-
This contains two main parts: - Exception, imo this represents the “right” approach to an error trait object - a set of macros to get ok wrapping / “throwing” function syntax
1 reply 1 retweet 18 likesShow this thread -
Importantly, Exception is built on std::error::Error. Unlike failure we don’t have a new trait everyone has to implement
2 replies 1 retweet 18 likesShow this thread -
Also, the Debug print for Exception prints the cause chain & stack trace. You can just make fn main throw and you’ll get a good print out
3 replies 4 retweets 24 likesShow this thread
Replying to @withoutboats
Also just read in the readme its a "narrow pointer" aka single word size. This is such a neat little detail! Everything about this is fantastic :D
1:00 PM - 20 Sep 2019
from Berlin, Germany
0 replies
0 retweets
2 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.