mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.regabi] cmd/compile: fix -h
The compile -h flag is *meant* to panic, so you can see the stack trace where the error is being printed. Make it do that again. Change-Id: Ieb0042863582d7a4c5d08d2f866a144962915b06 Reviewed-on: https://go-review.googlesource.com/c/go/+/274116 Trust: Russ Cox <rsc@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
ffa68716a0
commit
41ad4dec99
1 changed files with 3 additions and 0 deletions
|
|
@ -43,6 +43,9 @@ func hidePanic() {
|
|||
// about a panic too; let the user clean up
|
||||
// the code and try again.
|
||||
if err := recover(); err != nil {
|
||||
if err == "-h" {
|
||||
panic(err)
|
||||
}
|
||||
base.ErrorExit()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue