neon-mmd to RustEnglish · edit-21 year agoBlog Post: How To Wrap Your Errors With Enums When Using Error-Stackbetterprogramming.pubexternal-linkmessage-square4fedilinkarrow-up117arrow-down10
arrow-up117arrow-down1external-linkBlog Post: How To Wrap Your Errors With Enums When Using Error-Stackbetterprogramming.pubneon-mmd to RustEnglish · edit-21 year agomessage-square4fedilink
minus-squareSorteKanin@feddit.dklinkfedilinkEnglisharrow-up2·1 year agoI guess what I don’t really understand still is what advantage this provides over something like anyhow.
minus-squaresnaggenlinkfedilinkEnglisharrow-up1·1 year agoError stack will give will print the full stack of errors and their corresponding line in the code. Much like a backtrace, but for errors.
minus-squareSorteKanin@feddit.dklinkfedilinkEnglisharrow-up2·1 year agoDoesn’t anyhow also give a stack of errors? Although not with lines, that does sound useful.
minus-squaresnaggenlinkfedilinkEnglisharrow-up1·1 year agoYou are right, it does. But as you say, it seems more limited in that aspect than error-stack from a first glance.
I guess what I don’t really understand still is what advantage this provides over something like anyhow.
Error stack will give will print the full stack of errors and their corresponding line in the code. Much like a backtrace, but for errors.
Doesn’t anyhow also give a stack of errors? Although not with lines, that does sound useful.
You are right, it does. But as you say, it seems more limited in that aspect than error-stack from a first glance.