More missed exceptions.

This commit is contained in:
Huo Yaoyuan 2017-05-18 02:46:12 +08:00
parent 23e2d3ef07
commit 88f8619e9a
3 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ public override void Add(Drawable drawable)
var controlPoint = drawableControlPoints.LastOrDefault(t => t.CanContain(drawable)) ?? drawableControlPoints.FirstOrDefault();
if (controlPoint == null)
throw new Exception("Could not find suitable timing section to add object to.");
throw new InvalidOperationException("Could not find suitable timing section to add object to.");
controlPoint.Add(drawable);
}

View File

@ -34,7 +34,7 @@ protected override Playfield<ManiaHitObject, ManiaJudgement> CreatePlayfield()
ControlPoint firstTimingChange = Beatmap.TimingInfo.ControlPoints.FirstOrDefault(t => t.TimingChange);
if (firstTimingChange == null)
throw new Exception("The Beatmap contains no timing points!");
throw new InvalidOperationException("The Beatmap contains no timing points!");
// Generate the timing points, making non-timing changes use the previous timing change
var timingChanges = Beatmap.TimingInfo.ControlPoints.Select(c =>

View File

@ -288,7 +288,7 @@ private void flushQueue(bool failOldRequests = true)
{
APIRequest req;
while (oldQueue.TryDequeue(out req))
req.Fail(new Exception(@"Disconnected from server"));
req.Fail(new WebException(@"Disconnected from server"));
}
}