🎨 Improve debug output
This commit is contained in:
parent
4827292e9a
commit
e6d42844f5
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ function bpParse(dv: DataView, posIn: number = 0): { obj: any, pos: number } {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
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 };
|
return { obj, pos };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue