3 ms·
fmt.Printf failures are un-actionable, so there's no reason to handle them
by preseinger 3y ago
fmt.Printf failures are un-actionable, so there's no reason to handle them
- tgv 3y agoThat's what the parent comment means, I think.
- incompatible 3y agoI didn't mean anything in particular, I just made an observation. I feel bad for having all those unchecked error returns. I wouldn't want to wrap them in a panic, especially if it was some kind of server. Actually, I'm reminded of certain errors I've seen along the lines of "exception raised while handing exception".
- preseinger 3y agothe question is: does it matter if a given expression fails? if so, get the error and evaluate it -- like if json.Marshal fails in your http.Handler if not, (shrug) -- like (maybe) if your fmt.Printf fails panics are for core assertion violations, not an ersatz error reporting mechanism