tlv: display the unknown primitive type in MakePrimitiveRecord error message
This commit is contained in:
parent
aea529d9f6
commit
e60b36751c
@ -1,6 +1,7 @@
|
|||||||
package tlv
|
package tlv
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/btcsuite/btcd/btcec"
|
"github.com/btcsuite/btcd/btcec"
|
||||||
@ -126,7 +127,7 @@ func MakePrimitiveRecord(typ Type, val interface{}) Record {
|
|||||||
decoder = DVarBytes
|
decoder = DVarBytes
|
||||||
|
|
||||||
default:
|
default:
|
||||||
panic("unknown primitive type")
|
panic(fmt.Sprintf("unknown primitive type: %T", val))
|
||||||
}
|
}
|
||||||
|
|
||||||
return Record{
|
return Record{
|
||||||
|
Loading…
Reference in New Issue
Block a user