mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-17 16:32:11 +01:00
Improve error msg for no matching rac.CodecReader
This commit is contained in:
1 parent
05267a2edc
commit
a932033d6b
1 file changed
+10
-1
+10
-1
@@ -310,7 +310,16 @@ func (r *Reader) nextChunk() error {
|
||||
}
|
||||
}
|
||||
if codecReader == nil {
|
||||
r.err = fmt.Errorf("rac: no matching CodecReader for Codec 0x%02X", chunk.Codec)
|
||||
name := ""
|
||||
switch chunk.Codec {
|
||||
case CodecZlib:
|
||||
name = " (Zlib)"
|
||||
case CodecBrotli:
|
||||
name = " (Brotli)"
|
||||
case CodecZstandard:
|
||||
name = " (Zstandard)"
|
||||
}
|
||||
r.err = fmt.Errorf("rac: no matching CodecReader for Codec 0x%02X%s", chunk.Codec, name)
|
||||
return r.err
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user