🎨 Improve error message
This commit is contained in:
parent
747c6a4c15
commit
0122104f4c
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;
|
||||
}
|
||||
default:
|
||||
throw new Error(`Unexpected leading char during bencode parsing at position ${pos}.`);
|
||||
throw new Error(`Unexpected leading char 0x${header.toString(16)} during Bencode parsing at position ${pos - 1}.`);
|
||||
}
|
||||
return { obj, pos };
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue