Skip to content

Commit 0ad51e7

Browse files
authored
Merge pull request #638 from TeamNewPipe/spelling
Improve exception message thrown when not accepting an URL in LinkHandlerFactory#fromUrl(String url, String baseUrl)
2 parents 143fd3c + 858e007 commit 0ad51e7

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/LinkHandlerFactory.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,19 @@ public LinkHandler fromUrl(final String url) throws ParsingException {
5959
}
6060

6161
/**
62-
* Builds a {@link LinkHandler} from a url and a base url. The url is expected to be already
63-
* polished from google search redirects (otherwise how could {@code baseUrl} have been
62+
* Builds a {@link LinkHandler} from an URL and a base URL. The URL is expected to be already
63+
* polished from Google search redirects (otherwise how could {@code baseUrl} have been
6464
* extracted?).<br>
65-
* So do not call {@link Utils#followGoogleRedirectIfNeeded(String)} on the url if overriding
65+
* So do not call {@link Utils#followGoogleRedirectIfNeeded(String)} on the URL if overriding
6666
* this function, since that should be done in {@link #fromUrl(String)}.
67-
* @param url the url without google search redirects to extract id from
68-
* @param baseUrl the base url
67+
* @param url the URL without Google search redirects to extract id from
68+
* @param baseUrl the base URL
6969
* @return a {@link LinkHandler} complete with information
7070
*/
7171
public LinkHandler fromUrl(String url, String baseUrl) throws ParsingException {
72-
if (url == null) throw new IllegalArgumentException("url can not be null");
72+
if (url == null) throw new IllegalArgumentException("URL cannot be null");
7373
if (!acceptUrl(url)) {
74-
throw new ParsingException("Malformed unacceptable url: " + url);
74+
throw new ParsingException("URL not accepted: " + url);
7575
}
7676

7777
final String id = getId(url);

0 commit comments

Comments
 (0)