Standardise usages of exceptions.

This commit is contained in:
Huo Yaoyuan
2017-05-07 00:38:17 +08:00
parent 91ad0cb75e
commit 4f8549f220
6 changed files with 9 additions and 9 deletions

View File

@ -94,13 +94,13 @@ namespace osu.Game.Database
{
byte[] properties = new byte[5];
if (replayInStream.Read(properties, 0, 5) != 5)
throw new Exception("input .lzma is too short");
throw new IOException("input .lzma is too short");
long outSize = 0;
for (int i = 0; i < 8; i++)
{
int v = replayInStream.ReadByte();
if (v < 0)
throw new Exception("Can't Read 1");
throw new IOException("Can't Read 1");
outSize |= (long)(byte)v << (8 * i);
}