You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This release adds a stack trace feature to the public API.
3
+
This release enhances the public stack trace feature and adds it to `@go.log FATAL` output.
4
4
5
5
## The `./go` script: a unified development environment interface
6
6
@@ -16,19 +16,31 @@ This software is made available as [Open Source software](https://opensource.org
16
16
17
17
## What's new in this release
18
18
19
-
### Print stack traces
19
+
### Make `@go.print_stack_trace` take a numerical `skip_callers` argument
20
20
21
-
The`@go.print_stack_trace`function is now part of the public API. Its original use case was to provide more helpful error messages from `. "$_GO_USE_MODULES"`, but it's generally useful. See the function comments in `go-core.bash` and `./go test --edit core/print-stack-trace` for more information.
21
+
Previously`@go.print_stack_trace`would only skip the immediate caller if the first argument was not null. Now it enforces that the number be a positive integer, in order to skip over the specified number of callers while printing the stack trace. This was done to support better `@go.log FATAL` output, described below.
22
22
23
-
## Changes since v1.1.2
23
+
Normally an API change like this would warrant a major version bump, but since the impact should be minimal, it any potential for impact exists at all, it's included in this patch release.
24
+
25
+
### Include stack trace output on `@go.log FATAL` conditions
26
+
27
+
`@go.log FATAL` now prints a stack trace before exiting the process, since such information is generally useful under `FATAL` conditions. Every function in the `log` module that calls `@go.log FATAL` removes itself from the stack trace, so the top of the stack shows the location of the user code that triggered the condition, rather than the location of the `log` module function.
0 commit comments