eyre-rs / color-eyre

Custom hooks for colorful human oriented error reports via panics and the eyre crate
Other
958 stars 57 forks source link

show sections when panic macro is called #134

Open KaitlynEthylia opened 1 year ago

KaitlynEthylia commented 1 year ago

I have a function but it has to be passed to a library that im not in control of, meaning I can't just bubble up a Result to main and return it, i need to use panic!. Is there some way I can panic using a report instead of just a string

alercah commented 9 months ago

panic!("{:?}", report) should give you roughly what you want as a workaround until it's supported, although it'll duplicate some info.