From: Sergey Matveev Date: Thu, 12 Dec 2024 09:55:40 +0000 (+0300) Subject: Prettier panic output X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f7b4c0dde4f60239e49138fc8b8046245ef8de9068eeeec1bb643f1f3647687f;p=keks.git Prettier panic output --- diff --git a/gyac/enc.go b/gyac/enc.go index c9c912d..c689ec2 100644 --- a/gyac/enc.go +++ b/gyac/enc.go @@ -16,6 +16,7 @@ package gyac import ( + "fmt" "math/big" "sort" @@ -86,7 +87,7 @@ func (item Item) Encode(buf []byte) []byte { case types.Raw: return atom.RawEncode(buf, item.V.(atom.Raw)) default: - panic("unhandled type") + panic(fmt.Errorf("unhandled type: %v", item.T)) } return buf }