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