returns either InvalidPrefixError or TypeError depending on whether or not the prefix is recognized
(want Type, lead byte)
| 299 | // TypeError depending on whether or not |
| 300 | // the prefix is recognized |
| 301 | func badPrefix(want Type, lead byte) error { |
| 302 | t := getType(lead) |
| 303 | if t == InvalidType { |
| 304 | return InvalidPrefixError(lead) |
| 305 | } |
| 306 | return TypeError{Method: want, Encoded: t} |
| 307 | } |
| 308 | |
| 309 | // InvalidPrefixError is returned when a bad encoding |
| 310 | // uses a prefix that is not recognized in the MessagePack standard. |
no test coverage detected
searching dependent graphs…