-
Notifications
You must be signed in to change notification settings - Fork 433
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GeographicRestrictionException and SoundCloudGoPlusException in N…
…ewPipe Extractor to be able to display different error messages This commit adds two new exceptions in NewPipe Extractor: GeographicRestrictionException and SoundCloudGoPlusException (which extend to ContentNotAvailableException). These exceptions allow showing different error messages to user when a content isn't available in his/her/its country (only used for now by SoundCloudStreamExtractor) or when the content is a SoundCloud Go+ track.
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
...src/main/java/org/schabi/newpipe/extractor/exceptions/GeographicRestrictionException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.schabi.newpipe.extractor.exceptions; | ||
|
||
public class GeographicRestrictionException extends ContentNotAvailableException { | ||
public GeographicRestrictionException(String message) { | ||
super(message); | ||
} | ||
|
||
public GeographicRestrictionException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...ctor/src/main/java/org/schabi/newpipe/extractor/exceptions/SoundCloudGoPlusException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.schabi.newpipe.extractor.exceptions; | ||
|
||
public class SoundCloudGoPlusException extends ContentNotAvailableException { | ||
public SoundCloudGoPlusException() { | ||
super("This track is a SoundCloud Go+ track"); | ||
} | ||
|
||
public SoundCloudGoPlusException(Throwable cause) { | ||
super("This track is a SoundCloud Go+ track", cause); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters