Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception Handling: IllegalArgumentException #8

Closed
Flashky opened this issue Dec 10, 2018 · 1 comment
Closed

Exception Handling: IllegalArgumentException #8

Flashky opened this issue Dec 10, 2018 · 1 comment

Comments

@Flashky
Copy link
Owner

Flashky commented Dec 10, 2018

There is at least one known case of throwingIllegalArgumentException:

java.lang.IllegalArgumentException: Malformed URL: htttps://www.packtpub.com/packt/offers/free-learning
	at org.jsoup.helper.HttpConnection.url(HttpConnection.java:136)
	at org.jsoup.helper.HttpConnection.connect(HttpConnection.java:76)
	at org.jsoup.Jsoup.connect(Jsoup.java:73) 
       [...]
Caused by: java.net.MalformedURLException: unknown protocol: htttps
	at java.net.URL.<init>(URL.java:600)
	at java.net.URL.<init>(URL.java:490)
	at java.net.URL.<init>(URL.java:439)
	at org.jsoup.helper.HttpConnection.url(HttpConnection.java:134)

In this case, the IllegalArgumentException is caused by MalformedURLException.

The handler should:

  1. Log the exception message as error.
  2. Log the cause message as error.
  3. Log the exception trace on a different error file.
  4. Terminate the program.
@Flashky Flashky modified the milestones: Undetermined, 2.3.0 Dec 21, 2018
@Flashky
Copy link
Owner Author

Flashky commented Jun 18, 2019

Won't be done for now.

@Flashky Flashky closed this as completed Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant