3 ms·
"There is one significant drawback to this approach, at least for some applications: there is no way to know how much of the processing completed before the err
by al2o3cr 12y ago
"There is one significant drawback to this approach, at least for some applications: there is no way to know how much of the processing completed before the error occurred. If that information is important, a more fine-grained approach is necessary."
A more fine-grained approach which is conveniently omitted from the article, BECAUSE IT'S SPAMMING `if err != nil` EVERY OTHER STATEMENT...
- NateDad 12y agoThis is required for fine grained control of exceptions too. You have to wrap each statement in a try/catch which is even more verbose than the error check in go. Otherwise you can't programmatically tell which statement failed.
- prodigal_erik 12y agoJava has been recording stack traces for over a decade. This is an argument for building things into the language, because it would have been very difficult to roll our own version of it as a library.