better error message when finding HTML instead of metainfo
This commit is contained in:
@ -279,7 +279,9 @@ public class BDecoder
|
|||||||
public BEValue bdecodeMap() throws IOException
|
public BEValue bdecodeMap() throws IOException
|
||||||
{
|
{
|
||||||
int c = getNextIndicator();
|
int c = getNextIndicator();
|
||||||
if (c != 'd')
|
if (c == '<')
|
||||||
|
throw new InvalidBEncodingException("Expected a .torrent metainfo file but found HTML? Check URL or file!");
|
||||||
|
else if (c != 'd')
|
||||||
throw new InvalidBEncodingException("Expected 'd', not '"
|
throw new InvalidBEncodingException("Expected 'd', not '"
|
||||||
+ (char)c + "'");
|
+ (char)c + "'");
|
||||||
indicator = 0;
|
indicator = 0;
|
||||||
|
Reference in New Issue
Block a user