1
0
mirror of https://github.com/akaessens/NoFbEventScraper synced 2025-06-05 23:29:13 +02:00

remove unneeded try catch error handling

This commit is contained in:
akaessens
2020-08-28 16:59:11 +02:00
parent 6c0c2d23fe
commit 41eac31dba

View File

@ -23,6 +23,7 @@ import com.google.android.material.textfield.TextInputLayout;
import com.squareup.picasso.Picasso;
import java.lang.ref.WeakReference;
import java.util.Objects;
import static com.akdev.nofbeventscraper.FbEvent.dateTimeToEpoch;
@ -212,16 +213,9 @@ public class MainActivity extends AppCompatActivity {
error(null);
try {
String url = edit_text_uri_input.getText().toString();
scraper = new FbScraper(new WeakReference<>(this), url);
scraper.execute();
} catch (Exception e) {
e.printStackTrace();
error("Error: Invalid URL");
}
String url = Objects.requireNonNull(edit_text_uri_input.getText()).toString();
scraper = new FbScraper(new WeakReference<>(this), url);
scraper.execute();
}
public void error(String str) {