8 ms·
The sample code is pretty interesting from a return value vs exception perspective: despite being forced to look at return values, the code still silently ignor
by matthavener 17y ago
The sample code is pretty interesting from a return value vs exception perspective: despite being forced to look at return values, the code still silently ignores all errors
- jackpal 17y agoHey, good point! I think the best thing to do would be to send a message to an error channel before returning. I'll add that. For what it's worth I don't think exceptions would help here -- this is the top level function of a goroutine. That means there's no other function that's going to catch any exception that might be thrown (or error that might be returned) from this function.
- matthavener 17y agosorry for the late reply: yeah, that's even more interesting that because its inside a goroutine, there would be nothing to catch it. in this case, i think erlang got some things right with process linking