Files
mapsize/internal/scan/panic.go
T
Andy Dixon df8b10c6dd Add Bubble Tea TUI with interactive treemap
Cell canvas renderer with frame cache and a perceptual 256-colour
quantizer; responsive geometry (large/medium/small/too-small);
squarified treemap with nested previews, LOD grouping, category
colouring and adaptive labels; spatial arrow navigation with stable
NodeID selection; zoom and breadcrumbs; modal system (info, help,
confirm, save); list, file-type, top-N, scan-info, duplicate and
comparison views; live search/filter; mouse support; move-to-trash.
2026-10-02 08:25:35 +01:00

15 lines
390 B
Go

package scan
import "runtime/debug"
// OnPanic is called if a scanner goroutine panics. The default re-panics
// (crashing the process); the TUI replaces it so it can restore the terminal
// before reporting. Programmer bugs are never silently swallowed.
var OnPanic = func(v any, stack []byte) { panic(v) }
func guard() {
if v := recover(); v != nil {
OnPanic(v, debug.Stack())
}
}