Keep original exception when there is an error message (#710)

pull/714/head
Stypox 2021-08-13 16:13:58 +02:00 zatwierdzone przez GitHub
rodzic b6f951edb4
commit 52910ce970
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -80,12 +80,12 @@ public class StreamInfo extends Info {
// country.
//
// We will now detect whether the video is blocked by country or not.
String errorMsg = extractor.getErrorMessage();
if (errorMsg != null) {
throw new ContentNotAvailableException(errorMsg);
} else {
final String errorMessage = extractor.getErrorMessage();
if (isNullOrEmpty(errorMessage)) {
throw e;
} else {
throw new ContentNotAvailableException(errorMessage, e);
}
}