fix (imdb): error handling added

This commit is contained in:
Gergő Törcsvári 2016-03-25 18:03:25 +01:00
parent c38cdd8605
commit df05e84754

View File

@ -96,7 +96,9 @@ $@"🌍 **Weather for** 【{obj["target"]}】
string result;
try
{
result = ImdbScraper.ImdbScrape(e.GetArg("query"), false).ToString;
var movie = ImdbScraper.ImdbScrape(e.GetArg("query"), false);
if (movie.status) result = movie.ToString;
else result = "Failed to find that movie.";
}
catch
{