diff options
author | Arne Juul <arnej@yahooinc.com> | 2022-10-25 09:57:53 +0000 |
---|---|---|
committer | Arne Juul <arnej@yahooinc.com> | 2022-10-25 09:57:53 +0000 |
commit | 66c7993f6b36923f9c3e3ff063ce88a944590275 (patch) | |
tree | 9e8390c25f0e2d19f2dcdcd41ef3a362f4013cd2 /client | |
parent | 70026cc89de5a1586f7b70e261d0f09c437a2263 (diff) |
re-throw runtime errors to get their stack trace
Diffstat (limited to 'client')
-rw-r--r-- | client/go/script-utils/main.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/client/go/script-utils/main.go b/client/go/script-utils/main.go index 189140158ae..a27e94a76a7 100644 --- a/client/go/script-utils/main.go +++ b/client/go/script-utils/main.go @@ -6,6 +6,7 @@ package main import ( "fmt" "os" + "runtime" "strings" "github.com/vespa-engine/vespa/client/go/cmd/clusterstate" @@ -68,7 +69,9 @@ func main() { func handleSimplePanic() { if r := recover(); r != nil { - if je, ok := r.(error); ok { + if rte, ok := r.(runtime.Error); ok { + panic(rte) + } else if je, ok := r.(error); ok { fmt.Fprintln(os.Stderr, je) os.Exit(1) } else { |