summaryrefslogtreecommitdiffstats
path: root/client/go
diff options
context:
space:
mode:
authorArne Juul <arnej@yahooinc.com>2022-10-25 09:57:53 +0000
committerArne Juul <arnej@yahooinc.com>2022-10-25 09:57:53 +0000
commit66c7993f6b36923f9c3e3ff063ce88a944590275 (patch)
tree9e8390c25f0e2d19f2dcdcd41ef3a362f4013cd2 /client/go
parent70026cc89de5a1586f7b70e261d0f09c437a2263 (diff)
re-throw runtime errors to get their stack trace
Diffstat (limited to 'client/go')
-rw-r--r--client/go/script-utils/main.go5
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 {