summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'init.go')
-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()