mirror of
https://github.com/golang/go
synced 2024-11-26 06:27:58 -07: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
@ -43,6 +43,9 @@ func hidePanic() {
|
|||||||
// about a panic too; let the user clean up
|
// about a panic too; let the user clean up
|
||||||
// the code and try again.
|
// the code and try again.
|
||||||
if err := recover(); err != nil {
|
if err := recover(); err != nil {
|
||||||
|
if err == "-h" {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
base.ErrorExit()
|
base.ErrorExit()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user