summaryrefslogtreecommitdiff
path: root/lib/binstruct/structs.go
diff options
context:
space:
mode:
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