Using specific exception types
This commit is contained in:
parent
76b528e1d2
commit
6db3d9e645
|
|
@ -613,7 +613,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
|
||||||
consumed = scan;
|
consumed = scan;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
throw new Exception("Malformed request");
|
throw new InvalidDataException("Malformed request");
|
||||||
}
|
}
|
||||||
|
|
||||||
while (
|
while (
|
||||||
|
|
|
||||||
|
|
@ -484,7 +484,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
|
||||||
}
|
}
|
||||||
else if (block.Next == null)
|
else if (block.Next == null)
|
||||||
{
|
{
|
||||||
throw new Exception("end did not follow iterator");
|
throw new InvalidOperationException("end did not follow iterator");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.Framework.Primitives;
|
using Microsoft.Framework.Primitives;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
namespace Microsoft.AspNet.Server.Kestrel.Http
|
namespace Microsoft.AspNet.Server.Kestrel.Http
|
||||||
{
|
{
|
||||||
|
|
@ -167,7 +168,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
|
||||||
}
|
}
|
||||||
if (input.RemoteIntakeFin)
|
if (input.RemoteIntakeFin)
|
||||||
{
|
{
|
||||||
throw new Exception("Unexpected end of request content");
|
throw new InvalidDataException("Unexpected end of request content");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue