summaryrefslogtreecommitdiffhomepage
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/main.go b/main.go
index 4bc8a22f0..2e6954646 100644
--- a/main.go
+++ b/main.go
@@ -2,8 +2,15 @@ package main
import (
"github.com/kujtimiihoxha/termai/cmd"
+ "github.com/kujtimiihoxha/termai/internal/logging"
)
func main() {
+ // Set up panic recovery for the main function
+ defer logging.RecoverPanic("main", func() {
+ // Perform any necessary cleanup before exit
+ logging.ErrorPersist("Application terminated due to unhandled panic")
+ })
+
cmd.Execute()
}