From ad9ac6d07ce1819260c2b7f090fd4fe742c80d9f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 10 Jul 2022 23:49:07 -0600 Subject: Fuzz btrfsitem, and by consequence improve binstruct errors --- lib/binstruct/structs.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/binstruct/structs.go') diff --git a/lib/binstruct/structs.go b/lib/binstruct/structs.go index 2f224dd..72fd5e5 100644 --- a/lib/binstruct/structs.go +++ b/lib/binstruct/structs.go @@ -183,7 +183,10 @@ func getStructHandler(typ reflect.Type) structHandler { h, err := genStructHandler(typ) if err != nil { - panic(err) + panic(&InvalidTypeError{ + Type: typ, + Err: err, + }) } structCache[typ] = h return h -- cgit v1.2.3-2-g168b