Correctly exit if error in scraping instead of endless loop

This commit is contained in:
akaessens 2021-08-10 14:25:43 +02:00
parent 2b035b6975
commit b4d37fbc3f
2 changed files with 4 additions and 2 deletions

View File

@ -99,9 +99,11 @@ public class FbPageScraper extends AsyncTask<Void, Void, Void> {
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
this.error = R.string.error_connection; this.error = R.string.error_connection;
return null;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
this.error = R.string.error_unknown; this.error = R.string.error_unknown;
return null;
} }
} while (url != null); } while (url != null);