diff --git a/src/ssn/reader/bencodeParser.ts b/src/ssn/reader/bencodeParser.ts index f6c374d..b16acf4 100644 --- a/src/ssn/reader/bencodeParser.ts +++ b/src/ssn/reader/bencodeParser.ts @@ -73,7 +73,7 @@ function bpParse(dv: DataView, posIn: number = 0): { obj: any, pos: number } { break; } default: - throw new Error(`Unexpected leading char 0x${header.toString(16)} during Bencode parsing at position ${pos - 1}.`); + throw new Error(`Unexpected leading char 0x${header.toString(16)} during Bencode parsing at position ${pos - 1}. Full text:\n${decoder.decode(dv)}`); } return { obj, pos }; }