Has anyone designed an interesting error code system in @rustlang besides rustc itself? Any learnings or example code I can look at? I'm trying to design the error system for a CLI application that also has an API.
-
Show this thread
-
Cc
@yoshuawuyts because I basically see you as a quasi mentor for my Rust stuff
1 reply 0 retweets 9 likesShow this thread -
Replying to @zkat__
The error ascription stuff with ^^^^ exists as a standalone package on crates io (the name escapes me tho, can look up). I haven't seen anyone use error codes before. Perhaps lalrpop might have examples, but don't think I've seen it used outside of rustc.
1 reply 0 retweets 1 like -
Replying to @yoshuawuyts
oooh, it's its own crate? If you can figure out the name, that would be awesome.
1 reply 0 retweets 1 like -
Replying to @zkat__
Heh, having trouble finding it. Starting to doubt whether it exists now tho; maybe I got it confused with some of the proc macro APIs? Itd be great to have this tho! The other related crate I could find was compiletest, which helps when testing output:https://github.com/laumann/compiletest-rs …
1 reply 0 retweets 1 like -
Replying to @yoshuawuyts @zkat__
yosh Retweeted Louis
Twitter delivery!https://twitter.com/louispilfold/status/1203970040359464960 …
yosh added,
1 reply 0 retweets 3 likes
yosh Retweeted #[clippy::phansch]
Delivery II (which I think might be the right answer!) The "displaylist" submodule includes options for including error codes! :Dhttps://twitter.com/philhansch/status/1203979755009323008 …
yosh added,
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.