try to detect IO problems and throw IOException in case

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@312 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach 2010-10-19 19:13:50 +00:00
parent 98ceed52f8
commit c84b8fdbaa
6 changed files with 29 additions and 9 deletions

View file

@ -137,7 +137,7 @@ public final class ParserUtils
if (tries-- > 0)
System.out.println("got empty page, retrying...");
else
throw new IOException("got empty page: " + url);
throw new RuntimeException("got empty page: " + url);
}
}
catch (final SocketTimeoutException x)
@ -145,7 +145,7 @@ public final class ParserUtils
if (tries-- > 0)
System.out.println("socket timed out, retrying...");
else
throw x;
throw new RuntimeException(x);
}
}
}