
We can get the throw reason by looking at the argument "s" in runtime.throw. This is not currently working in Go 1.16 or Go 1.17 (see golang/go#46425), but does work in Go 1.15 and Go 1.14
7 lines
52 B
Go
7 lines
52 B
Go
package main
|
|
|
|
func main() {
|
|
var f func()
|
|
go f()
|
|
}
|