summaryrefslogtreecommitdiff
path: root/lib/binstruct/structs.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2022-07-10 23:49:07 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2022-07-11 00:44:30 -0600
commitad9ac6d07ce1819260c2b7f090fd4fe742c80d9f (patch)
treeab6a607ea8575382c978f07de943ccf6c077de7c /lib/binstruct/structs.go
parent41ef03aabf8d6db4f926480fc5ddfec014e342d3 (diff)
Fuzz btrfsitem, and by consequence improve binstruct errors
Diffstat (limited to 'lib/binstruct/structs.go')
-rw-r--r--lib/binstruct/structs.go5
1 files changed, 4 insertions, 1 deletions
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