summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-04 18:57:56 -0500
committerJeff Carr <[email protected]>2025-09-04 18:57:56 -0500
commit3a0f307270baf3eaecd8e21468e4580400d42587 (patch)
tree8443678a53be7c81b7efed9b102dba092d88aab2
parent8ab6e8fcdcbb6060ff4870b41c64aa7de68925ef (diff)
expose gui.Crash() as it's needed by all applicationsv0.22.53v0.22.52
-rw-r--r--init.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/init.go b/init.go
index 79691e6..87df3c7 100644
--- a/init.go
+++ b/init.go
@@ -17,7 +17,7 @@ import (
func initNew() {
defer func() {
if r := recover(); r != nil {
- crash(r, "watchCallback()")
+ Crash(r, "watchCallback()")
}
}()
log.Log(INFO, "init() has been run")
@@ -178,7 +178,7 @@ func toolkitPanic(pname string) {
me.rootNode.LoadToolkit("nocui")
}
-func crash(r any, what string) {
+func Crash(r any, what string) {
log.Warn("PANIC ecovered in ", r, what)
UnloadToolkits()
log.Warn("PANIC ecovered in before n.Custom()", r, what)
@@ -188,7 +188,7 @@ func crash(r any, what string) {
func watchCallback() {
defer func() {
if r := recover(); r != nil {
- crash(r, "watchCallback()")
+ Crash(r, "watchCallback()")
}
}()
log.Log(INFO, "guiChan() START")
@@ -256,7 +256,7 @@ func watchCallback() {
func (n *Node) gotUserEvent(a widget.Action) {
defer func() {
if r := recover(); r != nil {
- crash(r, "watchCallback()")
+ Crash(r, "watchCallback()")
}
}()
log.Log(CHANGE, "gotUserEvent() received event node =", n.id, n.progname, a.Value)
@@ -306,7 +306,7 @@ func (n *Node) gotUserEvent(a widget.Action) {
func something(n *Node) {
defer func() {
if r := recover(); r != nil {
- crash(r, "watchCallback()")
+ Crash(r, "watchCallback()")
}
}()
n.Custom()