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