From 74567945ac6883007e5f1506c5c9d04e42bcf4ed Mon Sep 17 00:00:00 2001 From: Dustin Oprea Date: Thu, 2 Jan 2020 07:04:22 -0500 Subject: [PATCH] v1/value_context.go: Bugfix for incorrectly handled ErrUnhandledUnknownTypedTag error --- value_context.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/value_context.go b/value_context.go index c5adff2..3fce352 100644 --- a/value_context.go +++ b/value_context.go @@ -351,7 +351,13 @@ func (vc *ValueContext) Undefined() (value interface{}, err error) { }() value, err = UndefinedValue(vc.ifdPath, vc.tagId, vc, vc.byteOrder) - log.PanicIf(err) + if err != nil { + if err == ErrUnhandledUnknownTypedTag { + return nil, err + } + + log.Panic(err) + } return value, nil }