aboutsummaryrefslogtreecommitdiff
path: root/src/builtin
diff options
context:
space:
mode:
authorDarren Grant <darren.e.grant@gmail.com>2019-03-14 16:33:35 -0400
committerRobert Griesemer <gri@golang.org>2019-04-05 00:52:55 +0000
commitf947c4dcfe6f22e6c92e6e5a170096b518a18448 (patch)
tree234104cc28c006e2f7cf69b8689e1ad8b299ffc0 /src/builtin
parentcebc4e514ae209dc00e171d70e10ef5bc17ba10d (diff)
downloadgo-f947c4dcfe6f22e6c92e6e5a170096b518a18448.tar.gz
go-f947c4dcfe6f22e6c92e6e5a170096b518a18448.zip
builtin: spec correction for panic()
Upon unrecovered panic and program termination, process exit code is hard-coded to 2, not set to the parameter passed to panic(). Change-Id: If64b75493227b4fd69c0bbb529f84e6df2d1b93f Reviewed-on: https://go-review.googlesource.com/c/go/+/167709 Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/builtin')
-rw-r--r--src/builtin/builtin.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/builtin/builtin.go b/src/builtin/builtin.go
index 61ed6100b4..01190e9900 100644
--- a/src/builtin/builtin.go
+++ b/src/builtin/builtin.go
@@ -226,10 +226,9 @@ func close(c chan<- Type)
// invocation of F then behaves like a call to panic, terminating G's
// execution and running any deferred functions. This continues until all
// functions in the executing goroutine have stopped, in reverse order. At
-// that point, the program is terminated and the error condition is reported,
-// including the value of the argument to panic. This termination sequence
-// is called panicking and can be controlled by the built-in function
-// recover.
+// that point, the program is terminated with a non-zero exit code. This
+// termination sequence is called panicking and can be controlled by the
+// built-in function recover.
func panic(v interface{})
// The recover built-in function allows a program to manage behavior of a