aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/mbf
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/mbf')
-rw-r--r--cmd/mbf/main.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go
index df089e89..f3532326 100644
--- a/cmd/mbf/main.go
+++ b/cmd/mbf/main.go
@@ -58,6 +58,19 @@ func main() {
log.Fatal("this program must not run as root")
}
+ defer func() {
+ r := recover()
+ if r == nil {
+ return
+ }
+
+ h, ok := r.(rosa.HandleError)
+ if !ok {
+ panic(r)
+ }
+ log.Fatal(h)
+ }()
+
ctx, stop := signal.NotifyContext(context.Background(),
syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP)
defer stop()