Skip to content
This repository was archived by the owner on Sep 28, 2020. It is now read-only.

Commit 56618d6

Browse files
committed
Include the video URL in the exception
1 parent dd937b4 commit 56618d6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

YoutubeExtractor/YoutubeExtractor/DownloadUrlResolver.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public static IEnumerable<VideoInfo> GetDownloadUrls(string videoUrl, bool decry
115115
throw;
116116
}
117117

118-
ThrowYoutubeParseException(ex);
118+
ThrowYoutubeParseException(ex, videoUrl);
119119
}
120120

121121
return null; // Will never happen, but the compiler requires it
@@ -312,9 +312,9 @@ private static JObject LoadJson(string url)
312312
return JObject.Parse(extractedJson);
313313
}
314314

315-
private static void ThrowYoutubeParseException(Exception innerException)
315+
private static void ThrowYoutubeParseException(Exception innerException, string videoUrl)
316316
{
317-
throw new YoutubeParseException("Could not parse the Youtube page.\n" +
317+
throw new YoutubeParseException("Could not parse the Youtube page for URL " + videoUrl + "\n" +
318318
"This may be due to a change of the Youtube page structure.\n" +
319319
"Please report this bug at www.github.com/flagbug/YoutubeExtractor/issues", innerException);
320320
}

0 commit comments

Comments
 (0)