From 9d4f7dfd7aadc98ceba083057e6d0b73bc0e81b8 Mon Sep 17 00:00:00 2001 From: Noah Treuhaft Date: Thu, 15 Oct 2026 14:48:33 -0400 Subject: [PATCH] runtime/sam/op: remove Catcher It's been unused since #7436. --- runtime/sam/op/catcher.go | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 runtime/sam/op/catcher.go diff --git a/runtime/sam/op/catcher.go b/runtime/sam/op/catcher.go deleted file mode 100644 index 58f2936beb..0000000000 --- a/runtime/sam/op/catcher.go +++ /dev/null @@ -1,29 +0,0 @@ -package op - -import ( - "fmt" - "runtime/debug" - - "github.com/superdb/super/sbuf" -) - -// Catcher wraps an Interface with a Pull method that recovers panics -// and turns them into errors. It should be wrapped around the output puller -// of a flowgraph and the top-level puller of any goroutine created inside -// of a flowgraph. -type Catcher struct { - parent sbuf.Puller -} - -func NewCatcher(parent sbuf.Puller) *Catcher { - return &Catcher{parent} -} - -func (c *Catcher) Pull(done bool) (b sbuf.Batch, err error) { - defer func() { - if r := recover(); r != nil { - err = fmt.Errorf("panic: %+v\n%s\n", r, debug.Stack()) - } - }() - return c.parent.Pull(done) -}