removed (Exception) from catches, added -readme/-guide command
This commit is contained in:
@ -192,7 +192,7 @@ namespace NadekoBot.Classes.Music {
|
||||
try {
|
||||
p.CancelOutputRead();
|
||||
p.Close();
|
||||
} catch (Exception) { }
|
||||
} catch { }
|
||||
Console.WriteLine("Buffering canceled, stream is completed.");
|
||||
return;
|
||||
}
|
||||
@ -221,7 +221,7 @@ namespace NadekoBot.Classes.Music {
|
||||
try {
|
||||
p.CancelOutputRead();
|
||||
p.Close();
|
||||
} catch (Exception) { }
|
||||
} catch { }
|
||||
|
||||
Console.WriteLine($"Didn't read anything from the stream for {attempt} attempts. {buffer.Length/1.MB()}MB length");
|
||||
return;
|
||||
|
@ -89,7 +89,7 @@ namespace NadekoBot
|
||||
ConnectedServers = connectedServers,
|
||||
DateAdded = DateTime.Now
|
||||
});
|
||||
} catch (Exception) {
|
||||
} catch {
|
||||
Console.WriteLine("DB Exception in stats collecting.");
|
||||
break;
|
||||
}
|
||||
@ -110,7 +110,7 @@ namespace NadekoBot
|
||||
CommandName = e.Command.Text,
|
||||
DateAdded = DateTime.Now
|
||||
});
|
||||
} catch (Exception) {
|
||||
} catch {
|
||||
Console.WriteLine("Parse error in ran command.");
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ namespace NadekoBot.Classes {
|
||||
rq = new RestSharp.RestRequest("anime/" + smallObj["id"]);
|
||||
rq.AddParameter("access_token", token);
|
||||
return await Task.Run(() => JsonConvert.DeserializeObject<AnimeResult>(cl.Execute(rq).Content));
|
||||
} catch (Exception) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -174,7 +174,7 @@ namespace NadekoBot.Classes {
|
||||
var matches = Regex.Matches(webpage, "data-large-file-url=\"(?<id>.*?)\"");
|
||||
|
||||
return await $"http://danbooru.donmai.us{ matches[rng.Next(0, matches.Count)].Groups["id"].Value }".ShortenUrl();
|
||||
} catch (Exception) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -190,7 +190,7 @@ namespace NadekoBot.Classes {
|
||||
//now extract the image from post page
|
||||
var match = Regex.Match(webpage, "\"(?<url>http://simg4.gelbooru.com//images.*?)\"");
|
||||
return match.Groups["url"].Value;
|
||||
} catch (Exception) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user