ref https://github.com/golang/go/wiki/Go2ErrorHandlingFeedback
- Provide access to the line number of the
check
statement (i.e. the equivalent of the old C __LINE__ directive) - Provide access to the source code filename (i.e. "my_code.go")
- Provide access to a tag value associated with the build (e.g. 'go build' could accept a "tag" option, which could be used to version the build)
There are many proposals that address the error handling issue of Go2 at the "function level".
The above suggestion is more focused on the "high level" issue of error handling -- the problem of how to "scale to large code bases and large developer efforts."
Many reported errors are easy to diagnose and remedy IF the developer can locate the correct line of code, in the correct source file, of the correct version AND (sometimes important) within the timeframe that the problem condition still exists.
For illustration, if given a stark choice between: (#1) the line number, source filename, and code version, but NO error code or message, versus (#2) an error code and message, but no precise location, it may be preferred by many developers to have #1, rather than #2!
.